File tree Expand file tree Collapse file tree 11 files changed +61
-0
lines changed Expand file tree Collapse file tree 11 files changed +61
-0
lines changed Original file line number Diff line number Diff line change @@ -1099,6 +1099,8 @@ fn test_netbsd(target: &str) {
1099
1099
// conflicting with `p_type` macro from <resolve.h>.
1100
1100
( "Elf32_Phdr" , "p_type" ) => true ,
1101
1101
( "Elf64_Phdr" , "p_type" ) => true ,
1102
+ // pthread_spin_t is a volatile uchar
1103
+ ( "pthread_spinlock_t" , "pts_spin" ) => true ,
1102
1104
_ => false ,
1103
1105
}
1104
1106
} ) ;
Original file line number Diff line number Diff line change @@ -3001,6 +3001,12 @@ pthread_self
3001
3001
pthread_setschedparam
3002
3002
pthread_setspecific
3003
3003
pthread_sigmask
3004
+ pthread_spin_destroy
3005
+ pthread_spin_init
3006
+ pthread_spin_lock
3007
+ pthread_spin_trylock
3008
+ pthread_spin_unlock
3009
+ pthread_spinlock_t
3004
3010
pthread_t
3005
3011
ptrace
3006
3012
ptrdiff_t
Original file line number Diff line number Diff line change @@ -1307,6 +1307,12 @@ pthread_mutexattr_setpshared
1307
1307
pthread_rwlockattr_getpshared
1308
1308
pthread_rwlockattr_setpshared
1309
1309
pthread_set_name_np
1310
+ pthread_spin_destroy
1311
+ pthread_spin_init
1312
+ pthread_spin_lock
1313
+ pthread_spin_trylock
1314
+ pthread_spin_unlock
1315
+ pthread_spinlock_t
1310
1316
ptrace
1311
1317
ptrace_io_desc
1312
1318
pututxline
Original file line number Diff line number Diff line change @@ -1558,6 +1558,12 @@ pthread_rwlockattr_getpshared
1558
1558
pthread_rwlockattr_setpshared
1559
1559
pthread_setaffinity_np
1560
1560
pthread_set_name_np
1561
+ pthread_spin_destroy
1562
+ pthread_spin_init
1563
+ pthread_spin_lock
1564
+ pthread_spin_trylock
1565
+ pthread_spin_unlock
1566
+ pthread_spinlock_t
1561
1567
ptrace
1562
1568
ptrace_io_desc
1563
1569
ptrace_vm_entry
Original file line number Diff line number Diff line change @@ -2913,6 +2913,12 @@ pthread_rwlockattr_setpshared
2913
2913
pthread_setaffinity_np
2914
2914
pthread_setschedparam
2915
2915
pthread_setschedprio
2916
+ pthread_spin_destroy
2917
+ pthread_spin_init
2918
+ pthread_spin_lock
2919
+ pthread_spin_trylock
2920
+ pthread_spin_unlock
2921
+ pthread_spinlock_t
2916
2922
ptrace
2917
2923
ptsname_r
2918
2924
pwrite64
Original file line number Diff line number Diff line change @@ -1205,6 +1205,12 @@ pthread_getattr_np
1205
1205
pthread_getaffinity_np
1206
1206
pthread_kill
1207
1207
pthread_mutex_timedlock
1208
+ pthread_spin_destroy
1209
+ pthread_spin_init
1210
+ pthread_spin_lock
1211
+ pthread_spin_trylock
1212
+ pthread_spin_unlock
1213
+ pthread_spinlock_t
1208
1214
pthread_setaffinity_np
1209
1215
pthread_setname_np
1210
1216
ptrace
Original file line number Diff line number Diff line change @@ -1008,6 +1008,12 @@ pthread_kill
1008
1008
pthread_main_np
1009
1009
pthread_mutex_timedlock
1010
1010
pthread_set_name_np
1011
+ pthread_spin_destroy
1012
+ pthread_spin_init
1013
+ pthread_spin_lock
1014
+ pthread_spin_trylock
1015
+ pthread_spin_unlock
1016
+ pthread_spinlock_t
1011
1017
pthread_stackseg_np
1012
1018
ptrace
1013
1019
ptrace_io_desc
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ pub type cpuset_t = cpumask_t;
26
26
pub type cpu_set_t = cpumask_t ;
27
27
28
28
pub type register_t = :: c_long ;
29
+ pub type umtx_t = :: c_int ;
30
+ pub type pthread_spinlock_t = :: uintptr_t ;
29
31
30
32
#[ cfg_attr( feature = "extra_traits" , derive( Debug ) ) ]
31
33
pub enum sem { }
@@ -1269,6 +1271,12 @@ extern "C" {
1269
1271
needle : * const :: c_void ,
1270
1272
needlelen : :: size_t ,
1271
1273
) -> * mut :: c_void ;
1274
+ pub fn pthread_spin_init ( lock : * mut pthread_spinlock_t , pshared : :: c_int ) -> :: c_int ;
1275
+ pub fn pthread_spin_destroy ( lock : * mut pthread_spinlock_t ) -> :: c_int ;
1276
+ pub fn pthread_spin_lock ( lock : * mut pthread_spinlock_t ) -> :: c_int ;
1277
+ pub fn pthread_spin_trylock ( lock : * mut pthread_spinlock_t ) -> :: c_int ;
1278
+ pub fn pthread_spin_unlock ( lock : * mut pthread_spinlock_t ) -> :: c_int ;
1279
+
1272
1280
pub fn sched_getaffinity ( pid : :: pid_t , cpusetsize : :: size_t , mask : * mut cpu_set_t ) -> :: c_int ;
1273
1281
pub fn sched_setaffinity ( pid : :: pid_t , cpusetsize : :: size_t , mask : * const cpu_set_t )
1274
1282
-> :: c_int ;
Original file line number Diff line number Diff line change @@ -712,6 +712,11 @@ extern "C" {
712
712
lock : * mut pthread_mutex_t ,
713
713
abstime : * const :: timespec ,
714
714
) -> :: c_int ;
715
+ pub fn pthread_spin_init ( lock : * mut pthread_spinlock_t , pshared : :: c_int ) -> :: c_int ;
716
+ pub fn pthread_spin_destroy ( lock : * mut pthread_spinlock_t ) -> :: c_int ;
717
+ pub fn pthread_spin_lock ( lock : * mut pthread_spinlock_t ) -> :: c_int ;
718
+ pub fn pthread_spin_trylock ( lock : * mut pthread_spinlock_t ) -> :: c_int ;
719
+ pub fn pthread_spin_unlock ( lock : * mut pthread_spinlock_t ) -> :: c_int ;
715
720
pub fn pipe2 ( fds : * mut :: c_int , flags : :: c_int ) -> :: c_int ;
716
721
717
722
pub fn getgrouplist (
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ pub type lwpid_t = ::c_uint;
12
12
pub type shmatt_t = :: c_uint ;
13
13
pub type cpuid_t = u64 ;
14
14
pub type cpuset_t = _cpuset ;
15
+ pub type pthread_spin_t = :: c_uchar ;
15
16
16
17
// elf.h
17
18
@@ -209,6 +210,12 @@ s! {
209
210
ptr_private: * mut :: c_void,
210
211
}
211
212
213
+ pub struct pthread_spinlock_t {
214
+ pts_magic: :: c_uint,
215
+ pts_spin: :: pthread_spin_t,
216
+ pts_flags: :: c_int,
217
+ }
218
+
212
219
pub struct kevent {
213
220
pub ident: :: uintptr_t,
214
221
pub filter: u32 ,
@@ -2067,6 +2074,7 @@ extern "C" {
2067
2074
size : :: size_t ,
2068
2075
set : * mut cpuset_t ,
2069
2076
) -> :: c_int ;
2077
+
2070
2078
pub fn _cpuset_create ( ) -> * mut cpuset_t ;
2071
2079
pub fn _cpuset_destroy ( set : * mut cpuset_t ) ;
2072
2080
pub fn _cpuset_clr ( cpu : cpuid_t , set : * mut cpuset_t ) -> :: c_int ;
You can’t perform that action at this time.
0 commit comments