8 #if (defined(__OS_IRIX__) || defined(__OS_LINUX__) || defined(__OS_MACOSX__))
12 typedef pthread_t THREAD_HANDLE;
13 typedef void * THREAD_RETURN;
14 typedef void * (*THREAD_FUNCTION)(
void *);
17 #elif defined(__OS_WINDOWS__)
21 #define THREAD_TYPE __stdcall
22 typedef unsigned long THREAD_HANDLE;
23 typedef unsigned THREAD_RETURN;
24 typedef unsigned (__stdcall *THREAD_FUNCTION)(
void *);
26 #elif defined(__RTOS__)
27 #include "freertos/FreeRTOS.h"
28 #include "freertos/task.h"
30 typedef TaskHandle_t THREAD_HANDLE;
31 typedef void THREAD_RETURN;
32 typedef void (*THREAD_FUNCTION)(
void *);
77 bool start( THREAD_FUNCTION routine,
void * ptr = NULL );
105 THREAD_HANDLE thread_;
STK base class.
Definition: Stk.h:144
STK thread class.
Definition: Thread.h:63
void testCancel(void)
Create a cancellation point within a thread routine.
Thread()
Default constructor.
bool cancel(void)
Signal cancellation of a thread routine, returning true on success.
bool start(THREAD_FUNCTION routine, void *ptr=NULL)
Begin execution of the thread routine. Upon success, true is returned.
bool wait(void)
Block the calling routine indefinitely until the thread terminates.
~Thread()
The class destructor does not attempt to cancel or join a thread.
The STK namespace.
Definition: ADSR.h:8