summaryrefslogtreecommitdiff
path: root/src/unix/bsd/freebsdlike/dragonfly/mod.rs
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2021-06-16 19:15:11 +0100
committerDC <devnexen@gmail.com>2021-06-17 10:44:01 +0100
commit7250a68be72501c610cf6fe4b7cee61742390b9e (patch)
treeda52581b722303c68d86690a9b96e7f62ec583dd /src/unix/bsd/freebsdlike/dragonfly/mod.rs
parent599ae1bc9d52e8d0ecb0f0ad9b69ec64ea87622f (diff)
downloadrust-libc-7250a68be72501c610cf6fe4b7cee61742390b9e.tar.gz
pthread_spinlock api remaining bsd systems
Diffstat (limited to 'src/unix/bsd/freebsdlike/dragonfly/mod.rs')
-rw-r--r--src/unix/bsd/freebsdlike/dragonfly/mod.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
index b9bdafed4e..8092db5705 100644
--- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs
+++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs
@@ -26,6 +26,8 @@ pub type cpuset_t = cpumask_t;
pub type cpu_set_t = cpumask_t;
pub type register_t = ::c_long;
+pub type umtx_t = ::c_int;
+pub type pthread_spinlock_t = ::uintptr_t;
#[cfg_attr(feature = "extra_traits", derive(Debug))]
pub enum sem {}
@@ -1269,6 +1271,12 @@ extern "C" {
needle: *const ::c_void,
needlelen: ::size_t,
) -> *mut ::c_void;
+ pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: ::c_int) -> ::c_int;
+ pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> ::c_int;
+ pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> ::c_int;
+ pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> ::c_int;
+ pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> ::c_int;
+
pub fn sched_getaffinity(pid: ::pid_t, cpusetsize: ::size_t, mask: *mut cpu_set_t) -> ::c_int;
pub fn sched_setaffinity(pid: ::pid_t, cpusetsize: ::size_t, mask: *const cpu_set_t)
-> ::c_int;