Skip to content

Commit 31e901b

Browse files
committed
Merge #872
872: Change sys::aio::lio_listio to sys::aio::LioCb::listio r=asomers a=asomers The new LioCb structure allows us to control the exact arguments passed to lio_listio, guaranteeing that each call gets a unique storage location for the list argument. This prevents clients from misusing lio_listio in a way that causes events to get dropped from a kqueue Fixes #870
2 parents 2def43d + 4b769a4 commit 31e901b

File tree

6 files changed

+617
-271
lines changed

6 files changed

+617
-271
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
1010
([#876](https://github.com/nix-rust/nix/pull/876))
1111
- Added `SO_MARK` on Linux.
1212
- ([#873](https://github.com/nix-rust/nix/pull/873))
13+
- Added safe support for nearly any buffer type in the `sys::aio` module.
14+
([#872](https://github.com/nix-rust/nix/pull/872))
15+
- Added `sys::aio::LioCb` as a wrapper for `libc::lio_listio`.
16+
([#872](https://github.com/nix-rust/nix/pull/872))
1317
- Added `getsid` in `::nix::unistd`
1418
([#850](https://github.com/nix-rust/nix/pull/850))
1519
- Added `alarm`. ([#830](https://github.com/nix-rust/nix/pull/830))
@@ -35,6 +39,11 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3539
([#837](https://github.com/nix-rust/nix/pull/837))
3640

3741
### Removed
42+
- Removed explicit support for the `bytes` crate from the `sys::aio` module.
43+
See `sys::aio::AioCb::from_boxed_slice`s examples for alternatives.
44+
([#872](https://github.com/nix-rust/nix/pull/872))
45+
- Removed `sys::aio::lio_listio`. Use `sys::aio::LioCb::listio` instead.
46+
([#872](https://github.com/nix-rust/nix/pull/872))
3847

3948
## [0.10.0] 2018-01-26
4049

Cargo.toml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,21 @@ bitflags = "1.0"
1717
cfg-if = "0.1.0"
1818
void = "1.0.2"
1919

20-
[dependencies.bytes]
21-
version = "0.4.5"
22-
# Don't include the optional serde feature
23-
default-features = false
24-
2520
[target.'cfg(target_os = "dragonfly")'.build-dependencies]
2621
cc = "1"
2722

2823
[dev-dependencies]
24+
# The examples use a new feature of Bytes which should be available in 0.4.7
25+
# https://github.com/carllerche/bytes/pull/192
26+
bytes = { git = "https://github.com/carllerche/bytes", rev = "ae1b454" }
2927
lazy_static = "1"
3028
rand = "0.4"
3129
tempdir = "0.3"
3230
tempfile = "2"
3331

32+
[target.'cfg(target_os = "freebsd")'.dev-dependencies]
33+
sysctl = "0.1"
34+
3435
[[test]]
3536
name = "test"
3637
path = "test/test.rs"
@@ -39,6 +40,10 @@ path = "test/test.rs"
3940
name = "test-aio-drop"
4041
path = "test/sys/test_aio_drop.rs"
4142

43+
[[test]]
44+
name = "test-lio-listio-resubmit"
45+
path = "test/sys/test_lio_listio_resubmit.rs"
46+
4247
[[test]]
4348
name = "test-mount"
4449
path = "test/test_mount.rs"

src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
#![deny(missing_debug_implementations)]
1717

1818
// External crates
19-
extern crate bytes;
2019
#[macro_use]
2120
extern crate bitflags;
2221
#[macro_use]

0 commit comments

Comments
 (0)