Skip to content

Commit 066e422

Browse files
committed
Add OpenBSD's futex.h.
1 parent 02f4f6c commit 066e422

File tree

1 file changed

+15
-0
lines changed
  • src/unix/bsd/netbsdlike/openbsd

1 file changed

+15
-0
lines changed

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

+15
Original file line numberDiff line numberDiff line change
@@ -1519,6 +1519,12 @@ pub const WCONTINUED: ::c_int = 8;
15191519
pub const FIND: ::ACTION = 0;
15201520
pub const ENTER: ::ACTION = 1;
15211521

1522+
// futex.h
1523+
pub const FUTEX_WAIT: ::c_int = 1;
1524+
pub const FUTEX_WAKE: ::c_int = 2;
1525+
pub const FUTEX_REQUEUE: ::c_int = 3;
1526+
pub const FUTEX_PRIVATE_FLAG: ::c_int = 128;
1527+
15221528
const_fn! {
15231529
{const} fn _ALIGN(p: usize) -> usize {
15241530
(p + _ALIGNBYTES) & !_ALIGNBYTES
@@ -1703,6 +1709,15 @@ extern "C" {
17031709
pub fn hcreate(nelt: ::size_t) -> ::c_int;
17041710
pub fn hdestroy();
17051711
pub fn hsearch(entry: ::ENTRY, action: ::ACTION) -> *mut ::ENTRY;
1712+
1713+
// futex.h
1714+
pub fn futex(
1715+
uaddr: *mut u32,
1716+
op: ::c_int,
1717+
val: ::c_int,
1718+
timeout: *const timespec,
1719+
uaddr2: *mut u32,
1720+
) -> ::c_int;
17061721
}
17071722

17081723
#[link(name = "execinfo")]

0 commit comments

Comments
 (0)