![]() |
DDNet documentation
|
Functions | |
| void * | thread_init (void(*threadfunc)(void *), void *user, const char *name) |
| void | thread_wait (void *thread) |
| void | thread_yield () |
| void | thread_request_precise_wakeups () |
| void | thread_detach (void *thread) |
| void | thread_init_and_detach (void(*threadfunc)(void *), void *user, const char *name) |
Threading related functions.
| void thread_detach | ( | void * | thread | ) |
Puts the thread in the detached state, guaranteeing that resources of the thread will be freed immediately when the thread terminates.
| thread | Thread to detach. |
| void * thread_init | ( | void(* | threadfunc )(void *), |
| void * | user, | ||
| const char * | name ) |
Creates a new thread.
| threadfunc | Entry point for the new thread. |
| user | Pointer to pass to the thread. |
| name | Name describing the use of the thread. |
| void thread_init_and_detach | ( | void(* | threadfunc )(void *), |
| void * | user, | ||
| const char * | name ) |
Creates a new thread and detaches it.
| threadfunc | Entry point for the new thread. |
| user | Pointer to pass to the thread. |
| name | Name describing the use of the thread. |
| void thread_request_precise_wakeups | ( | ) |
Requests the most precise timer wakeups that the system offers for the calling thread.
| void thread_wait | ( | void * | thread | ) |
Waits for a thread to be done or destroyed.
| thread | Thread to wait for. |
| void thread_yield | ( | ) |
Yield the current thread's execution slice.