Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add NetBSD's FUTEX_* constants. #2762

Merged
merged 2 commits into from
Apr 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions libc-test/semver/netbsd.txt
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,28 @@ FIONWRITE
FIOSETOWN
FLUSHO
FOPEN_MAX
FUTEX_WAIT
FUTEX_WAKE
FUTEX_FD
FUTEX_REQUEUE
FUTEX_CMP_REQUEUE
FUTEX_WAKE_OP
FUTEX_LOCK_PI
FUTEX_UNLOCK_PI
FUTEX_TRYLOCK_PI
FUTEX_WAIT_BITSET
FUTEX_WAKE_BITSET
FUTEX_WAIT_REQUEUE_PI
FUTEX_CMP_REQUEUE_PI
FUTEX_PRIVATE_FLAG
FUTEX_CLOCK_REALTIME
FUTEX_CMD_MASK
FUTEX_WAITERS
FUTEX_OWNER_DIED
FUTEX_SYNCOBJ_1
FUTEX_SYNCOBJ_0
FUTEX_TID_MASK
FUTEX_BITSET_MATCH_ANY
F_CLOSEM
F_GETNOSIGPIPE
F_GETOWN
Expand Down
23 changes: 23 additions & 0 deletions src/unix/bsd/netbsdlike/netbsd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1302,6 +1302,29 @@ pub const F_SETNOSIGPIPE: ::c_int = 14;
pub const F_MAXFD: ::c_int = 11;
pub const F_GETPATH: ::c_int = 15;

pub const FUTEX_WAIT: ::c_int = 0;
pub const FUTEX_WAKE: ::c_int = 1;
pub const FUTEX_FD: ::c_int = 2;
pub const FUTEX_REQUEUE: ::c_int = 3;
pub const FUTEX_CMP_REQUEUE: ::c_int = 4;
pub const FUTEX_WAKE_OP: ::c_int = 5;
pub const FUTEX_LOCK_PI: ::c_int = 6;
pub const FUTEX_UNLOCK_PI: ::c_int = 7;
pub const FUTEX_TRYLOCK_PI: ::c_int = 8;
pub const FUTEX_WAIT_BITSET: ::c_int = 9;
pub const FUTEX_WAKE_BITSET: ::c_int = 10;
pub const FUTEX_WAIT_REQUEUE_PI: ::c_int = 11;
pub const FUTEX_CMP_REQUEUE_PI: ::c_int = 12;
pub const FUTEX_PRIVATE_FLAG: ::c_int = 1 << 7;
pub const FUTEX_CLOCK_REALTIME: ::c_int = 1 << 8;
pub const FUTEX_CMD_MASK: ::c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME);
pub const FUTEX_WAITERS: u32 = 1 << 31;
pub const FUTEX_OWNER_DIED: u32 = 1 << 30;
pub const FUTEX_SYNCOBJ_1: u32 = 1 << 29;
pub const FUTEX_SYNCOBJ_0: u32 = 1 << 28;
pub const FUTEX_TID_MASK: u32 = (1 << 28) - 1;
pub const FUTEX_BITSET_MATCH_ANY: u32 = !0;

pub const IP_RECVDSTADDR: ::c_int = 7;
pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR;
pub const IP_RECVIF: ::c_int = 20;
Expand Down