Skip to content

Commit 40d529f

Browse files
committed
Auto merge of #2762 - m-ou-se:netbsd-futex-consts, r=Amanieu
Add NetBSD's FUTEX_* constants. This adds the FUTEX_* constants from NetBSD's [src/sys/sys/futex.h](http://ftp.netbsd.org/pub/NetBSD/NetBSD-current/src/sys/sys/futex.h).
2 parents 01b4902 + 6c130c9 commit 40d529f

File tree

2 files changed

+45
-0
lines changed

2 files changed

+45
-0
lines changed

libc-test/semver/netbsd.txt

+22
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,28 @@ FIONWRITE
346346
FIOSETOWN
347347
FLUSHO
348348
FOPEN_MAX
349+
FUTEX_WAIT
350+
FUTEX_WAKE
351+
FUTEX_FD
352+
FUTEX_REQUEUE
353+
FUTEX_CMP_REQUEUE
354+
FUTEX_WAKE_OP
355+
FUTEX_LOCK_PI
356+
FUTEX_UNLOCK_PI
357+
FUTEX_TRYLOCK_PI
358+
FUTEX_WAIT_BITSET
359+
FUTEX_WAKE_BITSET
360+
FUTEX_WAIT_REQUEUE_PI
361+
FUTEX_CMP_REQUEUE_PI
362+
FUTEX_PRIVATE_FLAG
363+
FUTEX_CLOCK_REALTIME
364+
FUTEX_CMD_MASK
365+
FUTEX_WAITERS
366+
FUTEX_OWNER_DIED
367+
FUTEX_SYNCOBJ_1
368+
FUTEX_SYNCOBJ_0
369+
FUTEX_TID_MASK
370+
FUTEX_BITSET_MATCH_ANY
349371
F_CLOSEM
350372
F_GETNOSIGPIPE
351373
F_GETOWN

src/unix/bsd/netbsdlike/netbsd/mod.rs

+23
Original file line numberDiff line numberDiff line change
@@ -1302,6 +1302,29 @@ pub const F_SETNOSIGPIPE: ::c_int = 14;
13021302
pub const F_MAXFD: ::c_int = 11;
13031303
pub const F_GETPATH: ::c_int = 15;
13041304

1305+
pub const FUTEX_WAIT: ::c_int = 0;
1306+
pub const FUTEX_WAKE: ::c_int = 1;
1307+
pub const FUTEX_FD: ::c_int = 2;
1308+
pub const FUTEX_REQUEUE: ::c_int = 3;
1309+
pub const FUTEX_CMP_REQUEUE: ::c_int = 4;
1310+
pub const FUTEX_WAKE_OP: ::c_int = 5;
1311+
pub const FUTEX_LOCK_PI: ::c_int = 6;
1312+
pub const FUTEX_UNLOCK_PI: ::c_int = 7;
1313+
pub const FUTEX_TRYLOCK_PI: ::c_int = 8;
1314+
pub const FUTEX_WAIT_BITSET: ::c_int = 9;
1315+
pub const FUTEX_WAKE_BITSET: ::c_int = 10;
1316+
pub const FUTEX_WAIT_REQUEUE_PI: ::c_int = 11;
1317+
pub const FUTEX_CMP_REQUEUE_PI: ::c_int = 12;
1318+
pub const FUTEX_PRIVATE_FLAG: ::c_int = 1 << 7;
1319+
pub const FUTEX_CLOCK_REALTIME: ::c_int = 1 << 8;
1320+
pub const FUTEX_CMD_MASK: ::c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME);
1321+
pub const FUTEX_WAITERS: u32 = 1 << 31;
1322+
pub const FUTEX_OWNER_DIED: u32 = 1 << 30;
1323+
pub const FUTEX_SYNCOBJ_1: u32 = 1 << 29;
1324+
pub const FUTEX_SYNCOBJ_0: u32 = 1 << 28;
1325+
pub const FUTEX_TID_MASK: u32 = (1 << 28) - 1;
1326+
pub const FUTEX_BITSET_MATCH_ANY: u32 = !0;
1327+
13051328
pub const IP_RECVDSTADDR: ::c_int = 7;
13061329
pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR;
13071330
pub const IP_RECVIF: ::c_int = 20;

0 commit comments

Comments
 (0)