#include <cybergarage/typedef.h>
#include <cybergarage/util/clist.h>
#include <pthread.h>
#include <signal.h>
Data Structures | |
struct | _CgThread |
The generic wrapper struct for CyberLinkC's threads. More... | |
Defines | |
#define | cg_thread_next(thread) (CgThread *)cg_list_next((CgList *)thread) |
#define | cg_thread_remove(thread) cg_list_remove((CgList *)thread) |
#define | cg_threadlist_clear(threadList) cg_list_clear((CgList *)threadList, (CG_LIST_DESTRUCTORFUNC)cg_thread_delete) |
#define | cg_threadlist_size(threadList) cg_list_size((CgList *)threadList) |
#define | cg_threadlist_gets(threadList) (CgThread *)cg_list_next((CgList *)threadList) |
#define | cg_threadlist_add(threadList, thread) cg_list_add((CgList *)threadList, (CgList *)thread) |
Typedefs | |
typedef _CgThread | CgThread |
The generic wrapper struct for CyberLinkC's threads. | |
typedef _CgThread | CgThreadList |
The generic wrapper struct for CyberLinkC's threads. | |
typedef void(* | CG_THREAD_FUNC )(CgThread *) |
Functions | |
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_restart (CgThread *thread) |
BOOL | cg_thread_isrunnable (CgThread *thread) |
void | cg_thread_setaction (CgThread *thread, CG_THREAD_FUNC actionFunc) |
void | cg_thread_setuserdata (CgThread *thread, void *data) |
void * | cg_thread_getuserdata (CgThread *thread) |
CgThreadList * | cg_threadlist_new () |
void | cg_threadlist_delete (CgThreadList *threadList) |
BOOL | cg_threadlist_start (CgThreadList *threadList) |
BOOL | cg_threadlist_stop (CgThreadList *threadList) |
|
|
|
|
|
Add a thread into a thread list
|
|
Clear the contents of a thread list
|
|
Get the first actual item from a thread list to use as an iterator
|
|
Get the size of a thread list
|
|
Prototype for the threads' worker functions |
|
The generic wrapper struct for CyberLinkC's threads. This wrapper has been created to enable 100% code compatibility between different platforms (Linux, Win32 etc..) |
|
The generic wrapper struct for CyberLinkC's threads. This wrapper has been created to enable 100% code compatibility between different platforms (Linux, Win32 etc..) |
|
Stop and destroy a thread.
|
|
Get the user data pointer
|
|
Check if a thread has been started
|
|
Create a new thread |
|
Restart a thread. Essentially calls cg_thread_stop() and cg_thread_start()
|
|
Set the thread's worker function.
|
|
Set the user data pointer
|
|
Start a thread (must be created first with ch_thread_new())
|
|
Stop a running thread.
|
|
Destroy a thread list
|
|
Create a new thread list
|
|
Start all threads in the thread list
|
|
Stop all threads in the thread list
|