diff options
Diffstat (limited to 'ctru-sys/src/thread.rs')
| -rw-r--r-- | ctru-sys/src/thread.rs | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/ctru-sys/src/thread.rs b/ctru-sys/src/thread.rs new file mode 100644 index 0000000..960807b --- /dev/null +++ b/ctru-sys/src/thread.rs @@ -0,0 +1,19 @@ +use {Handle, Result}; +use c_void; +use ThreadFunc; + +pub enum Struct_Thread_tag { } +pub type Thread = *mut Struct_Thread_tag; +extern "C" { + pub fn threadCreate(entrypoint: ThreadFunc, + arg: *mut c_void, stack_size: usize, + prio: i32, + affinity: i32, detached: u8) + -> Thread; + pub fn threadGetHandle(thread: Thread) -> Handle; + pub fn threadGetExitCode(thread: Thread) -> i32; + pub fn threadFree(thread: Thread); + pub fn threadJoin(thread: Thread, timeout_ns: u64) -> Result; + pub fn threadGetCurrent() -> Thread; + pub fn threadExit(rc: i32); +} |