Age | Commit message (Collapse) | Author |
|
Issue #514
|
|
|
|
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)
|
|
|
|
|
|
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.
|
|
|
|
|
|
Previously gethostname just mutated a buffer. We now provide
a slightly more usable (but still allocation free) API that ensures
that the returned buffer is NUL-terminated. We give back a `&CStr`
instead of requiring that the user do all of the conversions from
`&[u8]` when we know we are dealing with a `&CStr`.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
Although the underlying C API does take a pointer to a set of
characters, it is a requirement of almost every operating system
that these bytes not contain a premature NUL character or other
special characters. In other words, you want a `&str`. Changing
this to make the API make a bit more sense.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
|
|
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
|
|
Add support for system control sockets for XNU
I added support for macOS and iOS system sockets, which can be used to control the kernel as described [here](https://developer.apple.com/library/content/documentation/Darwin/Conceptual/NKEConceptual/control/control.html).
To do this, I had to add in support for `ioctl` on those platforms, so I added in `ioctl` support for all BSD-based platforms. The API seems to be the same between [xnu](https://opensource.apple.com/source/xnu/xnu-3248.60.10/bsd/sys/ioccom.h.auto.html), [FreeBSD](https://github.com/freebsd/freebsd/blob/master/sys/sys/ioccom.h), [NetBSD](https://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/ioccom.h), [OpenBSD](http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/sys/sys/ioccom.h?rev=1.5&content-type=text/x-cvsweb-markup) and [Dragonfly BSD](http://gitweb.dragonflybsd.org/dragonfly.git/blob/HEAD:/sys/sys/ioccom.h).
I added a test that runs on macOS and iOS for the functionality. Let me know if I need to make any changes!
|
|
Ensure child stack passed to clone is 16 byte aligned.
The current implementation assumes that the array passed by the caller is word aligned (which I don't think Rust guarantees for [u8]) and a multiple of the word size.
|
|
Added getpgrp
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|
|
|
|
|
|
Add note about CLONE_NEWCGROUP from pull request #457 to CHANGELOG.md.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
|
|
|
|
|
|
|
|
|
|
These were both recently added to libc, add wrappers.
Signed-off-by: Dylan Reid <dgreid@chromium.org>
---
Changes since v2:
Updated function comments and CHANGELOG
Changes since v1:
Add function comments, update CHANGELOG
|
|
Supporting older verisons of rust is causing CI to fail and is
a somewhat constant support burden with questionable value. 1.7.0
is the oldest I have seen that people have had a requirement on
supporting in recent history.
It may make sense to work toward a more official policy on
what version of rust we will support in the future. Users of
older version of rust are, of course, welcome to use older versions
of nix and everything else in the ecosystem.
Signed-off-by: Paul Osborne <osbpau@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Replace ffi module by libc functions in mqueue.rs
This is almost finished. I still need to check if I introduced any breaking changes by changing signatures. I would want to record this in the change log, however, for that we still need to merge #391.
- [x] update change log
- [x] run rustfmt on `src/mqueue.rs`
|
|
|
|
|
|
|
|
Closes #408.
|
|
|
|
- Added initial CHANGELOG.md with Changes from Version 0.6.0 and the
upcoming changes for version 0.7.0.
- Added RELEASE_PROCEDURE.md detailing what changes should be made
to CHANGELOG.md during a release.
- Added sections about CHANGELOG.md in CONVENTIONS.md and
CONTRIBUTIONS.md.
|