mirror of
https://gitee.com/openharmony/third_party_rust_libc
synced 2024-10-07 05:33:48 +00:00
Add OpenBSD's futex.h.
This commit is contained in:
parent
02f4f6cbcc
commit
311c7d9e3b
@ -434,6 +434,7 @@ fn test_openbsd(target: &str) {
|
||||
"signal.h",
|
||||
"string.h",
|
||||
"sys/file.h",
|
||||
"sys/futex.h",
|
||||
"sys/ioctl.h",
|
||||
"sys/ipc.h",
|
||||
"sys/mman.h",
|
||||
|
@ -215,6 +215,10 @@ FIONREAD
|
||||
FIOSETOWN
|
||||
FLUSHO
|
||||
FOPEN_MAX
|
||||
FUTEX_WAIT
|
||||
FUTEX_WAKE
|
||||
FUTEX_REQUEUE
|
||||
FUTEX_PRIVATE_FLAG
|
||||
F_GETOWN
|
||||
F_LOCK
|
||||
F_RDLCK
|
||||
@ -987,6 +991,7 @@ fsid_t
|
||||
fstatfs
|
||||
ftok
|
||||
fusefs_args
|
||||
futex
|
||||
futimes
|
||||
getdomainname
|
||||
getdtablesize
|
||||
|
@ -1519,6 +1519,12 @@ pub const WCONTINUED: ::c_int = 8;
|
||||
pub const FIND: ::ACTION = 0;
|
||||
pub const ENTER: ::ACTION = 1;
|
||||
|
||||
// futex.h
|
||||
pub const FUTEX_WAIT: ::c_int = 1;
|
||||
pub const FUTEX_WAKE: ::c_int = 2;
|
||||
pub const FUTEX_REQUEUE: ::c_int = 3;
|
||||
pub const FUTEX_PRIVATE_FLAG: ::c_int = 128;
|
||||
|
||||
const_fn! {
|
||||
{const} fn _ALIGN(p: usize) -> usize {
|
||||
(p + _ALIGNBYTES) & !_ALIGNBYTES
|
||||
@ -1703,6 +1709,15 @@ extern "C" {
|
||||
pub fn hcreate(nelt: ::size_t) -> ::c_int;
|
||||
pub fn hdestroy();
|
||||
pub fn hsearch(entry: ::ENTRY, action: ::ACTION) -> *mut ::ENTRY;
|
||||
|
||||
// futex.h
|
||||
pub fn futex(
|
||||
uaddr: *mut u32,
|
||||
op: ::c_int,
|
||||
val: ::c_int,
|
||||
timeout: *const ::timespec,
|
||||
uaddr2: *mut u32,
|
||||
) -> ::c_int;
|
||||
}
|
||||
|
||||
#[link(name = "execinfo")]
|
||||
|
Loading…
Reference in New Issue
Block a user