aboutsummaryrefslogtreecommitdiff
path: root/ctru-sys/src/thread.rs
blob: 960807b940034c937dc134379bcf3ec2d67a81e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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);
}