Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The nix::sys::mman::mmap documentation says
> Calls to mmap are inherently unsafe, so they must be made in an unsafe
block.
however, the function was not actually marked unsafe.
* `munmap` should also be `unsafe` for obvious reasons.
* `madvise` should be `unsafe` because of the MADV_DONTNEED flag.
* `mlock` was already marked `unsafe`
* `munlock` and `msync` don't strictly need to be `unsafe` despite
taking pointers AFAICT, but are marked `unsafe` for consistency and in
case they add additional flags in the future.
|
|
Improve AIO API
- Turn most `aio_*` functions into `AioCb` methods
- Add runtime checks to `AioCb` methods
- Implement `Drop` for `AioCb`
|
|
Remove EPOLLWAKEUP and SIGEV_THREAD_ID when cross-compiling to MIPS.
With this nix builds for mipsel-unknown-linux-gnu.
|
|
Added BaudRate enum for termios
Issue #514
Does not provide `BaudRate::EXTA` or `BaudRate::EXTB` constants. These seem to alias to `B19200` and `B38400` respectively and so break the 1:1 mapping needed by `From`. I don't know their historic use.
|
|
|
|
This is possible now that EPOLLEXCLUSIVE was added to libc in
https://github.com/rust-lang/libc/pull/526
|
|
Also, fix style bug in AIO tests
|
|
New baud constants landed in rust-lang/libc#530, we'll use them.
|
|
|
|
Issue #514
|
|
Fix the style for bitflags!
Prefer `libc_bitflags!` over `bitflags!`. Prefer `libc::CONSTANTS` over
writing the constant manually.
This makes #501 unnecessary, since upstream now contains the `O_TMPFILE` constant.
|
|
|
|
Fix unresolved name error when building with musl.
See: https://git.musl-libc.org/cgit/musl/tree/src/time/timer_create.c#n126
|
|
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over
writing the constant manually.
|
|
Implement major/minor macros, correct mkdev
It appears that the previous `mkdev` was based on the kernel headers (https://github.com/torvalds/linux/blob/v4.7/include/linux/kdev_t.h#L6) which (I guess) is the internal kernel dev_t. Scrolling down the file you can see some bitshifting operations to do conversions.
The new implementation(s) are based on [musl](http://git.musl-libc.org/cgit/musl/tree/include/sys/sysmacros.h?id=dbbb3734d8c0176feabd6c46e2e85bbc3b8a60af) and [glibc](https://github.molgen.mpg.de/git-mirror/glibc/blob/20003c49884422da7ffbc459cdeee768a6fee07b/sysdeps/unix/sysv/linux/sys/sysmacros.h#L38), which are in agreement about how dev_t should be handled.
(as it happens I suspect we could omit the shift by 32 since I don't see that in the kernel headers, but doesn't hurt to take the conservative route and mimic the libcs)
|
|
|
|
|
|
|
|
|
|
wait: Support ptrace events for Linux
Adds new WaitStatus value `PtraceEvent`. Implementation of #273 that only affects Linux/Android.
|
|
If an AioCb has any in-kernel state, AioCb.drop will print a warning and
wait for it to complete.
|
|
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.
|