Age | Commit message (Collapse) | Author |
|
Prevent immutable buffers from being used with aio_read or lio_listio
with LIO_READ. AioCb.from_slice no longer needs to be unsafe.
|
|
|
|
Add POSIX AIO support
POSIX AIO is a standard for asynchronous file I/O. Read, write, and
fsync operations can all take place in the background, with completion
notification delivered by a signal, by a new thread, by kqueue, or not
at all.
The SigEvent class, used for AIO notifications among other things, is
also added.
|
|
|
|
fix #480 and add simple test cases for that.
r? @fiveop
|
|
Fix ControlMessage::encode_into when encoding multiple messages
copy_bytes updates dst so that it points after the bytes that were just
copied into it. encode_into did not advance the buffer in the same way
when encoding the data.
See #473
|
|
fix build for eventfd feature
|
|
Always use libc's socketaddr_storage
Since rust-lang/rust#23425 is closed, we no longer need the special
case.
|
|
Since rust-lang/rust#23425 is closed, we no longer need the special
case.
|
|
|
|
|
|
|
|
POSIX AIO is a standard for asynchronous file I/O. Read, write, and
fsync operations can all take place in the background, with completion
notification delivered by a signal, by a new thread, by kqueue, or not
at all. This commit supports all standard AIO functions. However,
lio_listio is disabled on macos because it doesn't seem to work, even
though the syscall is present.
The SigEvent class, used for AIO notifications among other things, is
also added.
Also, impl AsRef for TimeVal and TimeSpec
|
|
|
|
|
|
|
|
|
|
|
|
r? @fiveop
|
|
copy_bytes updates dst so that it points after the bytes that were just
copied into it. encode_into did not advance the buffer in the same way
when encoding the data.
|
|
|
|
|
|
|
|
|
|
Also, fix the TimeSpec::cmp and TimeVal::cmp methods, and fix some
formatting
|
|
Also, add trait TimeValLike, so some code can be shared between TimeSpec
and TimeVal.
|
|
|
|
By exposing its members, nix allowed users to create denormalized
TimeVals, which don't work with the derived() Eq and Ord methods.
Better to make TimeVal opaque, so it will always be normalized.
|
|
There were multiple errors regarding Unix domain sockets:
* UnixAddr::path assumed that gethostbyname and similar functions would
include the terminating null as part of len. That is not universally
true. In fact, POSIX only guarantees that len will be at least large
enough to store the non-null-terminated path. So it could be larger or
smaller than nix was assuming. Since abstract sockets' paths are not
strings, we can't modify gethostbyname. Instead, I implemented the fix in
UnixAddr::path and UnixAddr::new. I clarified the documentation too.
* SockAddr::as_ffi_pair contained a Linuxism.
* sockaddr_storage_to_addr forgot to adjust sun_len when creating a UnixAddr
|
|
Change SigFlags into an enum.
Addresses #459.
This is a breaking change.
Should SigFlags be renamed to something more sensible?
|
|
Change KEvent to treat udata as an intptr_t instead of a uintptr_t.
This matches NetBSD's C definitions. Other operating systems define
it as void*, despite not really being a pointer, but none actually
define it as uintptr_t. Better to be right on NetBSD and wrong
everywhere else than wrong everywhere. Plus, it's what mio expects.
Please include this PR in nix 0.8.0
|
|
|
|
This matches NetBSD's C definitions. Other operating systems define
it as void*, despite not really being a pointer, but none actually
define it as uintptr_t. Better to be right on NetBSD and wrong
everywhere else than wrong everywhere. Plus, it's what mio expects.
|
|
|
|
|
|
|
|
The script checked for rustc >= 1.6.0, but the minimum supported version for
this crate is now 1.7.0
|
|
|
|
|
|
|
|
Don't use it for FilterFlag, because it triggers recursion limit reached error
|
|
|
|
|
|
|
|
Add epoll_create1
In order to get @kubo39's PR #384 forward, I cleaned up the commit history a bit and added `EpollEvent` back.
Since this module is used by mio, maybe @carllerche could comment on these changes.
|
|
|
|
|
|
Fixes #421.
|
|
|
|
The final version of libc's PR #379 removed a few definitions, and fixed
OpenBSD's definition of fn kevent.
|