Age | Commit message (Collapse) | Author |
|
This commit adds support for the signal timer mechanism in POSIX, the
mirror to timerfd on Linux.
Resolves #1424
Signed-off-by: Brian L. Troutwine <brian@troutwine.us>
|
|
Using features reduces build time and size for consumer crates. By
default all features are enabled.
|
|
- Add docs for `memfd_create`, `shm_open`, and `shm_unlink`
- Add man-page links
- Remove` #[allow(missing_docs)]`on the `memfd` module
|
|
1509: Allow Android to use timerfd r=asomers a=rtzoeller
This is a continuation of #1336 which also enables the timerfd tests.
```
running 3 tests
test sys::test_timerfd::test_timerfd_unset ... ok
test sys::test_timerfd::test_timerfd_oneshot ... ok
test sys::test_timerfd::test_timerfd_interval ... ok
```
1515: Add IP_TTL/IPV6_UNICAST_HOPS SockOpts r=asomers a=cemeyer
Test: `cargo test --test test test_ttl_opts`
Co-authored-by: Ryan Zoeller <rtzoeller@rtzoeller.com>
Co-authored-by: Conrad Meyer <cem@FreeBSD.org>
|
|
Also, test rustdoc in CI, and demote missing_docs from a deny to a
warning (but still deny it in CI).
|
|
Co-authored-by: zachoverflow <zach@zachjohnson.net>
|
|
Switch from allow(missing_docs) to deny(missing_docs), which should
gradually help us moving forward. Also, add a few missing docs, such as
for sched and aio.
|
|
This work is a continutation on previou contribution by @kpcyrd and @j1ah0ng.
|
|
Androids bionic supports eventfd. Extend the conditional compilation
check to include the target_os "android".
Fixes #1480
|
|
Co-authored-by: Dominik Hassler <hadfl@omnios.org>
Co-authored-by: Joshua M. Clulow <josh@sysmgr.org>
|
|
Adds a high level `Persona` bitflags enum, as well as `personality::get()`
and `personality::set()` for interacting with `libc::personality()`.
|
|
Removed support for timerfd on Android as it seems to have been deprecated? See https://android.googlesource.com/platform/development/+/73a5a3b/ndk/platforms/android-20/include/sys/timerfd.h or https://github.com/rust-lang/libc/issues/1589
Removed the public status of `TimerSpec`, as it should not be exposed to the user.
Implemented `FromRawFd` for `TimerFd` as it already implements `AsRawFd`.
Addressed comments from the latest code review:
- Removed upper bound assertions on timer expirations in tests.
- Made the main example runnable and added code to show how to wait for the timer.
- Refactored `ClockId` to use `libc_enum`.
- Added comments for all public parts of the module.
- Wrapped to 80 cols.
- Changed the size of the buffer in the tests to the minimum required.
* Ran rustfmt.
* Added a `From` implementation for `libc::timespec` -> `TimeSpec`.
* Reworked the example with the new changes and changed the timer from 5 to 1 second.
* Added a constructor for a 0-initialized `TimerSpec`.
* Added a new method to get the timer configured expiration (based on timerfd_gettime).
* Added an helper method to unset the expiration of the timer.
* Added a `wait` method to actually read from the timer.
* Renamed `settime` into just `set`.
* Refactored the tests and added a new one that tests both the `unset` and the `get` method.
Modified CHANGELOG.
|
|
TODO: Fix them in Relibc
|
|
|
|
Some things are not implemented yet in redox, so a lot of annotations
were added to remove functions when compiling for redox. Those functions
will hopefully be added in time, but for now it's better to have partial
support than none.
Blocked by https://github.com/rust-lang/libc/pull/1438
|
|
|
|
|
|
* Moved ptrace API into it's own module with cfg'ed modules exported for linux/android or BSDs.
* Replicated current linux API for BSD
* Added API functions to peek and poke memory to avoid needing to replicate deprecated linux API and remaining feature complete
* Added helper function for `PTRACE_KILL` requests
* Updated tests based on new API changes
* Added addition kill calls to `test_ptrace_cont` as inferior death doesn't happen immediately on OSX which caused issues in the tests.
|
|
|
|
|
|
* Split `ioctl!` into separate macros. This makes documentation easier to read.
* For every `ioctl_*!` macro include a description of the macro arguments as, the
function prototype for the generated wrapper function, and an example if we have one.
* Expose `request_code_*!` in the documentation to make the `ioctl_*_bad` macros easier to use.
* Reorganize the file hierarchy to be simpler
|
|
libc reads sys/statvfs.h on all OS except Windows which nix doesn't care
about.
Closes: https://github.com/nix-rust/nix/issues/831
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
|
|
|
|
|
|
750: Migrate quota module to libc FFI types r=asomers a=Susurrus
|
|
|
|
This module merely contained FFI declarations, and only enough to
implement memfd_create() and pivot_root() wrapper functions in
nix. Since these declarations are redundant with equivalent FFI
declarations in libc, we'll remove them here. In the future, any
syscall-related wrapper function will be implemented directly and
utilize libc for FFI declarations as we cannot generically expose
a type-safe `syscall()` because of its variadic argument list.
|
|
|
|
|
|
|
|
Note that this is now only available for Linux as support is missing in libc
for Android (see rust-lang/libc#671).
As part of this work the SIGUSR2 signal mutex was altered to be a general
signal mutex. This is because all signal handling is shared across all threads
in the Rust test harness, so if you alter one signal, depending on whether it's
additive or may overwrite the mask for other signals, it could break the other
ones. Instead of putting this on the user, just broaden the scope of the mutex
so that any altering of signal handling needs to use it.
|
|
|
|
|
|
Nothing that nix currently binds is architecture-specific, and Android
supports ptrace just as much as non-Android Linux.
|
|
|
|
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
|
|
|
|
|
|
|
|
The module wraps context handling related functions and structs.
|
|
|
|
|
|
* Implement `Default`
* Add documentation
* Add some convenience wrappers
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|