| 43 | #define pthread_cancel(thread) !TerminateThread((HANDLE) thread, 0) |
| 44 | |
| 45 | static inline int |
| 46 | pthread_create(void *threadid, const void *threadattr, void *threadfunc, |
| 47 | void *args) |
| 48 | { |
| 49 | RTE_SET_USED(threadattr); |
| 50 | HANDLE hThread; |
| 51 | hThread = CreateThread(NULL, 0, |
| 52 | (LPTHREAD_START_ROUTINE)(uintptr_t)threadfunc, |
| 53 | args, 0, (LPDWORD)threadid); |
| 54 | if (hThread) { |
| 55 | SetPriorityClass(GetCurrentProcess(), NORMAL_PRIORITY_CLASS); |
| 56 | SetThreadPriority(hThread, THREAD_PRIORITY_NORMAL); |
| 57 | } |
| 58 | return ((hThread != NULL) ? 0 : E_FAIL); |
| 59 | } |
| 60 | |
| 61 | static inline int |
| 62 | pthread_mutex_init(pthread_mutex_t *mutex, |
no outgoing calls