|
Cyber Garage Portable Runtime (CGPR) for C
|
Functions | |
| static void | cg_sig_handler (int sign) |
| static void * | cg_posix_thread_proc (void *param) |
| CGThread * | cg_thread_new (void) |
| bool | cg_thread_delete (CGThread *thread) |
| bool | cg_thread_start (CGThread *thread) |
| bool | cg_thread_stop (CGThread *thread) |
| bool | cg_thread_restart (CGThread *thread) |
| bool | cg_thread_isrunnable (CGThread *thread) |
| bool | cg_thread_isrunning (CGThread *thread) |
| void | cg_thread_setaction (CGThread *thread, CG_THREAD_FUNC func) |
| void | cg_thread_setuserdata (CGThread *thread, void *value) |
| void * | cg_thread_getuserdata (CGThread *thread) |
|
static |
|
static |
| bool cg_thread_delete | ( | CGThread * | thread | ) |
Stop and destroy a thread.
| thread | Thread to destroy |
| void * cg_thread_getuserdata | ( | CGThread * | thread | ) |
Get the user data pointer
| thread | Thread from which to get the pointer |
| bool cg_thread_isrunnable | ( | CGThread * | thread | ) |
Check if a thread has been started
| thread | Thread to check |
| bool cg_thread_isrunning | ( | CGThread * | thread | ) |
| CGThread * cg_thread_new | ( | void | ) |
Create a new thread
| bool cg_thread_restart | ( | CGThread * | thread | ) |
Restart a thread. Essentially calls cg_thread_stop() and cg_thread_start()
| thread | Thread to restart |
| void cg_thread_setaction | ( | CGThread * | thread, |
| CG_THREAD_FUNC | actionFunc ) |
Set the thread's worker function.
| thread | Thread struct |
| actionFunc | Function pointer to set as the worker function |
| void cg_thread_setuserdata | ( | CGThread * | thread, |
| void * | data ) |
Set the user data pointer
| thread | Thread struct |
| data | Pointer to user data |
| bool cg_thread_start | ( | CGThread * | thread | ) |
Start a thread (must be created first with ch_thread_new())
| thread | Thread to start |
| bool cg_thread_stop | ( | CGThread * | thread | ) |
Stop a running thread.
| thread | Thread to stop |