Skip to content

Commit b53ccb8

Browse files
committed
illumos: Add eventfd support
1 parent 714ab82 commit b53ccb8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libc-test/build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,7 @@ fn test_solarish(target: &str) {
707707
"stdlib.h",
708708
"string.h",
709709
"sys/epoll.h",
710+
"sys/eventfd.h",
710711
"sys/file.h",
711712
"sys/filio.h",
712713
"sys/ioctl.h",

src/unix/solarish/illumos.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,13 @@ s! {
1818
pub const AF_LOCAL: ::c_int = 1; // AF_UNIX
1919
pub const AF_FILE: ::c_int = 1; // AF_UNIX
2020

21+
pub const EFD_SEMAPHORE: ::c_int = 0x1;
22+
pub const EFD_NONBLOCK: ::c_int = 0x800;
23+
pub const EFD_CLOEXEC: ::c_int = 0x80000;
24+
2125
extern "C" {
26+
pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int;
27+
2228
pub fn mincore(
2329
addr: ::caddr_t,
2430
len: ::size_t,

0 commit comments

Comments
 (0)