separate alignment requirements for file offset and buffer address

This commit is contained in:
Arvid Norberg
2009-01-19 09:21:21 +00:00
parent d506bcd5de
commit cedea0980f
2 changed files with 25 additions and 11 deletions

View File

@@ -135,9 +135,13 @@ namespace libtorrent
// when opened in unbuffered mode, this is the
// required alignment of file_offsets. i.e.
// any (file_offset & (pos_alignment()-1)) == 0
// is a precondition
// is a precondition to read and write operations
int pos_alignment() const;
// when opened in unbuffered mode, this is the
// required alignment of buffer addresses
int buf_alignment() const;
size_type writev(size_type file_offset, iovec_t const* bufs, int num_bufs, error_code& ec);
size_type readv(size_type file_offset, iovec_t const* bufs, int num_bufs, error_code& ec);