Skip to content

Commit 7e6fcd1

Browse files
committed
Add pthread functions
1 parent 37010b7 commit 7e6fcd1

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/unix/redox/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,12 @@ pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1;
306306
pub const PTHREAD_MUTEX_INITIALIZER: ::pthread_mutex_t = -1isize as *mut _;
307307
pub const PTHREAD_COND_INITIALIZER: ::pthread_cond_t = -1isize as *mut _;
308308
pub const PTHREAD_RWLOCK_INITIALIZER: ::pthread_rwlock_t = -1isize as *mut _;
309+
extern {
310+
pub fn pthread_create(tid: *mut ::pthread_t,
311+
attr: *const ::pthread_attr_t,
312+
start: extern fn(*mut ::c_void) -> *mut ::c_void,
313+
arg: *mut ::c_void) -> ::c_int;
314+
}
309315

310316
// signal.h
311317
pub const SIG_BLOCK: ::c_int = 0;
@@ -343,6 +349,11 @@ pub const SIGIO: ::c_int = 29;
343349
pub const SIGPWR: ::c_int = 30;
344350
pub const SIGSYS: ::c_int = 31;
345351
pub const NSIG: ::c_int = 32;
352+
extern {
353+
pub fn pthread_sigmask(how: ::c_int,
354+
set: *const ::sigset_t,
355+
oldset: *mut ::sigset_t) -> ::c_int;
356+
}
346357

347358
// stat.h
348359
pub const S_IFDIR: ::c_int = 0o040_000;

0 commit comments

Comments
 (0)