|
Kore 3
|
Supports the creation and destruction of threads. More...
Go to the source code of this file.
Data Structures | |
| struct | kore_thread |
Typedefs | |
| typedef struct kore_thread | kore_thread |
Functions | |
| KORE_FUNC void | kore_thread_init (kore_thread *thread, void(*func)(void *param), void *param) |
| Starts a thread via the provided function. | |
| KORE_FUNC void | kore_thread_wait_and_destroy (kore_thread *thread) |
| Waits for the thread to complete execution and then destroys it. | |
| KORE_FUNC bool | kore_thread_try_to_destroy (kore_thread *thread) |
| Attempts to destroy a thread. | |
| KORE_FUNC void | kore_thread_set_name (const char *name) |
| Assigns a name to the current thread which will then show up in debuggers and profilers. | |
| KORE_FUNC void | kore_thread_sleep (int milliseconds) |
| Puts the current thread to sleep. | |
Supports the creation and destruction of threads.
| KORE_FUNC void kore_thread_init | ( | kore_thread * | thread, |
| void(* | func )(void *param), | ||
| void * | param ) |
Starts a thread via the provided function.
| thread | The thread-object to initialize with the new thread |
| func | The function used to start a new thread |
| param | A parameter that is passed to the thread-function when the thread starts running |
| KORE_FUNC void kore_thread_set_name | ( | const char * | name | ) |
Assigns a name to the current thread which will then show up in debuggers and profilers.
| name | The name to assign to the thread |
| KORE_FUNC void kore_thread_sleep | ( | int | milliseconds | ) |
Puts the current thread to sleep.
| milliseconds | How long to sleep |
| KORE_FUNC bool kore_thread_try_to_destroy | ( | kore_thread * | thread | ) |
Attempts to destroy a thread.
| thread | The thread to destroy |
| KORE_FUNC void kore_thread_wait_and_destroy | ( | kore_thread * | thread | ) |
Waits for the thread to complete execution and then destroys it.
| thread | The thread to destroy |