38 namespace rp{
namespace hal{
45 _beginthreadex(NULL, 0, (
unsigned int (_stdcall * )(
void * ))proc,
53 if (TerminateThread( reinterpret_cast<HANDLE>(this->
_handle), -1))
55 CloseHandle(reinterpret_cast<HANDLE>(this->
_handle));
68 int win_priority = THREAD_PRIORITY_NORMAL;
72 win_priority = THREAD_PRIORITY_TIME_CRITICAL;
75 win_priority = THREAD_PRIORITY_HIGHEST;
78 win_priority = THREAD_PRIORITY_NORMAL;
81 win_priority = THREAD_PRIORITY_LOWEST;
84 win_priority = THREAD_PRIORITY_IDLE;
88 if (SetThreadPriority(reinterpret_cast<HANDLE>(this->
_handle), win_priority))
98 int win_priority = ::GetThreadPriority(reinterpret_cast<HANDLE>(this->
_handle));
100 if (win_priority == THREAD_PRIORITY_ERROR_RETURN)
105 if (win_priority >= THREAD_PRIORITY_TIME_CRITICAL )
109 else if (win_priority<THREAD_PRIORITY_TIME_CRITICAL && win_priority>=THREAD_PRIORITY_ABOVE_NORMAL)
113 else if (win_priority<THREAD_PRIORITY_ABOVE_NORMAL && win_priority>THREAD_PRIORITY_BELOW_NORMAL)
116 }
else if (win_priority<=THREAD_PRIORITY_BELOW_NORMAL && win_priority>THREAD_PRIORITY_IDLE)
119 }
else if (win_priority<=THREAD_PRIORITY_IDLE)
129 switch ( WaitForSingleObject(reinterpret_cast<HANDLE>(this->
_handle), timeout))
132 CloseHandle(reinterpret_cast<HANDLE>(this->
_handle));
u_result join(unsigned long timeout=-1)
static Thread create(thread_proc_t proc, void *data=NULL)
u_result setPriority(priority_val_t p)
priority_val_t getPriority()
#define RESULT_OPERATION_TIMEOUT
typedef _word_size_t(THREAD_PROC *thread_proc_t)(void *)
#define RESULT_OPERATION_FAIL
GLsizei GLsizei GLenum GLenum const GLvoid * data