version 1.20.8.1, 2013/06/03 22:35:14
|
version 1.21, 2012/12/10 12:57:28
|
|
|
| |
static void exit(ThreadReturnType rc); | static void exit(ThreadReturnType rc); |
| |
|
static void cancel(ThreadType th); |
|
|
static void yield(); | static void yield(); |
| |
static void sleep(int msec); | static void sleep(int msec); |
|
|
pthread_exit(rc); | pthread_exit(rc); |
} | } |
| |
|
inline void Threads::cancel(ThreadType th) |
|
{ |
|
pthread_cancel(th.thread); |
|
} |
|
|
inline void Threads::yield() | inline void Threads::yield() |
{ | { |
#ifdef PEGASUS_OS_LINUX | #ifdef PEGASUS_OS_LINUX |
|
|
_endthreadex(rc); | _endthreadex(rc); |
} | } |
| |
|
inline void Threads::cancel(ThreadType th, ThreadReturnType rc) |
|
{ |
|
TerminateThread(th.handle, rc); |
|
} |
|
|
inline void Threads::yield() | inline void Threads::yield() |
{ | { |
Sleep(0); | Sleep(0); |