#include <signal.h>#include <cybergarage/util/cthread.h>#include <cybergarage/util/clog.h>#include <string.h>Functions | |
| static void | sig_handler (int sign) |
| static void * | PosixThreadProc (void *param) |
| CgThread * | cg_thread_new () |
| BOOL | cg_thread_delete (CgThread *thread) |
| BOOL | cg_thread_start (CgThread *thread) |
| BOOL | cg_thread_stop (CgThread *thread) |
| BOOL | cg_thread_stop_with_cond (CgThread *thread, CgCond *cond) |
| BOOL | cg_thread_restart (CgThread *thread) |
| BOOL | cg_thread_isrunnable (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) |
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 |
Check if a thread has been started
| thread | Thread to check |
| CgThread* cg_thread_new | ( | ) |
Create a new 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 |
Start a thread (must be created first with ch_thread_new())
| thread | Thread to start |
Stop the running thread and signal the given CGCond.
| static void* PosixThreadProc | ( | void * | param | ) | [static] |
| static void sig_handler | ( | int | sign | ) | [static] |
1.4.7