Skip to content

Commit e1b9757

Browse files
committed
Expose EPOLLEXCLUSIVE on illumos platform
Initially the EPOLLEXCLUSIVE definition was hidden on the illumos platform as it lacked explicit support. After further review, it was concluded that EPOLLEXCLUSIVE can safely be considered a no-op, when not fully implemented by the OS, making it safe for use on illumos.
1 parent 8e90fcb commit e1b9757

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

libc-test/build.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -794,6 +794,11 @@ fn test_solarish(target: &str) {
794794
// This evaluates to a sysconf() call rather than a constant
795795
"PTHREAD_STACK_MIN" => true,
796796

797+
// EPOLLEXCLUSIVE is a relatively recent addition to the epoll interface and may not be
798+
// defined on older systems. It is, however, safe to use on systems which do not
799+
// explicitly support it. (A no-op is an acceptable implementation of EPOLLEXCLUSIVE.)
800+
"EPOLLEXCLUSIVE" => true,
801+
797802
_ => false,
798803
});
799804

src/unix/solarish/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1838,6 +1838,7 @@ pub const EPOLLET: ::c_int = 0x80000000;
18381838
pub const EPOLLRDHUP: ::c_int = 0x2000;
18391839
pub const EPOLLONESHOT: ::c_int = 0x40000000;
18401840
pub const EPOLLWAKEUP: ::c_int = 0x20000000;
1841+
pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
18411842
pub const EPOLL_CLOEXEC: ::c_int = 0x80000;
18421843
pub const EPOLL_CTL_ADD: ::c_int = 1;
18431844
pub const EPOLL_CTL_MOD: ::c_int = 3;

src/unix/solarish/solaris.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ s! {
2929
pub const PORT_SOURCE_POSTWAIT: ::c_int = 8;
3030
pub const PORT_SOURCE_SIGNAL: ::c_int = 9;
3131

32-
pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000;
33-
3432
pub const AF_LOCAL: ::c_int = 0;
3533
pub const AF_FILE: ::c_int = 0;
3634

0 commit comments

Comments
 (0)