summaryrefslogtreecommitdiff
path: root/src/sys/mod.rs
diff options
context:
space:
mode:
authorAlan Somers <asomers@gmail.com>2016-09-18 21:17:41 -0600
committerAlan Somers <asomers@gmail.com>2016-12-16 22:56:28 -0700
commitd3f9b96adc81bb862770f330466d2f2e8d9ab1bc (patch)
tree5afa7e43fa5500877144be10d50665cca5a23e21 /src/sys/mod.rs
parent9b81000bdaa1636017f88609337c972a04effad8 (diff)
downloadnix-d3f9b96adc81bb862770f330466d2f2e8d9ab1bc.zip
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. 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
Diffstat (limited to 'src/sys/mod.rs')
-rw-r--r--src/sys/mod.rs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sys/mod.rs b/src/sys/mod.rs
index 706614dc..7675f944 100644
--- a/src/sys/mod.rs
+++ b/src/sys/mod.rs
@@ -1,3 +1,7 @@
+#[cfg(any(target_os = "freebsd", target_os = "dragonfly", target_os = "ios",
+ target_os = "netbsd", target_os = "macos", target_os = "linux"))]
+pub mod aio;
+
#[cfg(any(target_os = "linux", target_os = "android"))]
pub mod epoll;