summaryrefslogtreecommitdiff
path: root/src/sys
AgeCommit message (Collapse)Author
2017-04-09Split socket consts. test across ARM arch.Zac Berkowitz
2017-04-09Removed tests on ARM for non-existant constants.Zac Berkowitz
2017-04-09Removed unused libc imports in termios.Zac Berkowitz
2017-04-09Added missing syscalls for powerpcZac Berkowitz
2017-04-09Removed some socket constants from arch=armZac Berkowitz
2017-04-09Fixed constants for MIPSZac Berkowitz
2017-04-09Fixes nix-rust/nix#532Zac Berkowitz
2017-04-09Switched bsd speed_t def. to libc::speed_tZac Berkowitz
2017-03-21add support for `fstatat`Jörg Thalheim
2017-03-18Actually mark mmap and related functions as `unsafe`Kevin Mehall
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.
2017-02-27Auto merge of #506 - asomers:aio3, r=posborneHomu
Improve AIO API - Turn most `aio_*` functions into `AioCb` methods - Add runtime checks to `AioCb` methods - Implement `Drop` for `AioCb`
2017-02-26Auto merge of #526 - Fulkerson:master, r=posborneHomu
Remove EPOLLWAKEUP and SIGEV_THREAD_ID when cross-compiling to MIPS. With this nix builds for mipsel-unknown-linux-gnu.
2017-02-26Auto merge of #518 - berkowski:baud_constants, r=posborneHomu
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.
2017-02-25Remove EPOLLWAKEUP and SIGEV_THREAD_ID when cross-compiling to MIPS.Johan Anderholm
2017-02-25epoll: Use libc_bitflags for EpollFlagsKamal Marhubi
This is possible now that EPOLLEXCLUSIVE was added to libc in https://github.com/rust-lang/libc/pull/526
2017-02-24impl Debug for AioCb and SigevNotifyAlan Somers
Also, fix style bug in AIO tests
2017-02-25Using baud constants from libcZac Berkowitz
New baud constants landed in rust-lang/libc#530, we'll use them.
2017-02-25Corrected linux baud constants to octalsZac Berkowitz
2017-02-25Added BaudRate enum for termiosZac Berkowitz
Issue #514
2017-02-23Auto merge of #503 - Idolf:bitflags, r=kamalmarhubiHomu
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.
2017-02-22Fix the inner type of EpollFlagsMathias Svensson
2017-02-23Auto merge of #513 - yxd-hde:fix-musl, r=posborneHomu
Fix unresolved name error when building with musl. See: https://git.musl-libc.org/cgit/musl/tree/src/time/timer_create.c#n126
2017-02-19Fix the style for bitflags!Mathias Svensson
Prefer libc_bitflags! over bitflags!. Prefer libc::CONSTANTS over writing the constant manually.
2017-02-18Auto merge of #508 - aidanhs:aphs-major-minor-macros, r=posborneHomu
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)
2017-02-17Implement major/minor macros, correct mkdevAidan Hobson Sayers
2017-02-16Fix some identifiers in commentsAlan Somers
2017-02-16Update bitflags to 0.7Simon Sapin
2017-02-16Fix unresolved name error when building with musl.YANG Xudong
2017-02-14Auto merge of #438 - chaosagent:wait-ptrace, r=kamalmarhubiHomu
wait: Support ptrace events for Linux Adds new WaitStatus value `PtraceEvent`. Implementation of #273 that only affects Linux/Android.
2017-02-05Implement Drop for AioCbAlan Somers
If an AioCb has any in-kernel state, AioCb.drop will print a warning and wait for it to complete.
2017-02-05Add runtime checks to AioCb methodsAlan Somers
Prevent immutable buffers from being used with aio_read or lio_listio with LIO_READ. AioCb.from_slice no longer needs to be unsafe.
2017-01-26Turn most aio functions into AioCb methodsAlan Somers
2017-01-26Auto merge of #483 - asomers:aio2, r=posborneHomu
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.
2017-01-25Add PhantomData to AioCb to track buffer's lifetimeAlan Somers
2017-01-11Auto merge of #486 - hicqu:master, r=fiveopHomu
fix #480 and add simple test cases for that. r? @fiveop
2017-01-11Auto merge of #489 - fiveop:fixcopyinto, r=fiveopHomu
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
2017-01-11Auto merge of #492 - domsj:fix-eventfd-feature, r=fiveopHomu
fix build for eventfd feature
2017-01-11Auto merge of #496 - fiveop:consolidate_socketaddr_storage, r=@fiveopHomu
Always use libc's socketaddr_storage Since rust-lang/rust#23425 is closed, we no longer need the special case.
2017-01-10Always use libc's socketaddr_storagePhilipp Matthias Schaefer
Since rust-lang/rust#23425 is closed, we no longer need the special case.
2016-12-29fix eventfd buildJan Doms
2016-12-19fix all and update CHANGELOG.mdqupeng
2016-12-19Merge branch 'nix-rust'qupeng
2016-12-16Add POSIX AIO supportAlan Somers
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
2016-12-16Fix build on iOS platformConrad Kramer
2016-12-12EpollEvent::empty(): using mem::zeroed instead of mem::uninitialized.qupeng
2016-12-12epoll: improve EpollEvent::empty() by using mem::uninitialized.qupeng
2016-12-11fix EpollEvent::empty()qupeng
2016-12-11add empty() in EpollEvent.qupeng
2016-12-11fix #480 and add simple test cases for that.qupeng
r? @fiveop
2016-12-10Fix ControlMessage::encode_into when encoding multiple messagesPhilipp Matthias Schaefer
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.