diff options
| author | Ronald Kinard <[email protected]> | 2016-05-03 01:15:18 -0500 |
|---|---|---|
| committer | Ronald Kinard <[email protected]> | 2016-05-03 01:15:18 -0500 |
| commit | ff5a09832fe4534f657b3dcd80dff9e178ee0d70 (patch) | |
| tree | af443f2e659a288b45cc5db980f1ae6180739163 /ctru-sys/src/thread.rs | |
| parent | Whoops, that's zlib, not BSD-3. (diff) | |
| parent | Update AUTHORS.md (diff) | |
| download | ctru-rs-ff5a09832fe4534f657b3dcd80dff9e178ee0d70.tar.xz ctru-rs-ff5a09832fe4534f657b3dcd80dff9e178ee0d70.zip | |
Merge pull request #4 from FenrirWolf/master
Compatibility fixes + new bindings + refactoring
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); +} |