cthread.c File Reference

#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)
CgThreadcg_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 func)
void cg_thread_setuserdata (CgThread *thread, void *value)
void * cg_thread_getuserdata (CgThread *thread)

Function Documentation

BOOL cg_thread_delete CgThread thread  ) 
 

Stop and destroy a thread.

Parameters:
thread Thread to destroy

void* cg_thread_getuserdata CgThread thread  ) 
 

Get the user data pointer

Parameters:
thread Thread from which to get the pointer

BOOL cg_thread_isrunnable CgThread thread  ) 
 

Check if a thread has been started

Parameters:
thread Thread to check

CgThread* cg_thread_new  ) 
 

Create a new thread

BOOL cg_thread_restart CgThread thread  ) 
 

Restart a thread. Essentially calls cg_thread_stop() and cg_thread_start()

Parameters:
thread Thread to restart

void cg_thread_setaction CgThread thread,
CG_THREAD_FUNC  actionFunc
 

Set the thread's worker function.

Parameters:
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

Parameters:
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())

Parameters:
thread Thread to start

BOOL cg_thread_stop CgThread thread  ) 
 

Stop a running thread.

Parameters:
thread Thread to stop

static void* PosixThreadProc void *  param  )  [static]
 

static void sig_handler int  sign  )  [static]
 


Generated on Fri Jun 16 16:58:34 2006 for CyberLinkC by  doxygen 1.4.6