_PR_MD_SET_PRIORITY(&(thread->md), priority);
if (priority != PR_PRIORITY_NORMAL) { _PR_MD_SET_PRIORITY(&(thread->md), priority); }
_PR_MD_CREATE_THREAD(PRThread *thread,                   void (*start)(void *),                   PRThreadPriority priority,                   PRThreadScope scope,                   PRThreadState state,                   PRUint32 stackSize){    thread->md.handle = (HANDLE) _beginthreadex(                    NULL,                    thread->stack->stackSize,#if defined(__MINGW32__)                    (void *)start,#else                    (unsigned (__stdcall *)(void *))start,#endif                    (void *)thread,                    CREATE_SUSPENDED,                    &(thread->id));    if(!thread->md.handle) {        return PR_FAILURE;    }    thread->md.id = thread->id;    _PR_MD_SET_PRIORITY(&(thread->md), priority);    /* Activate the thread */    if ( ResumeThread( thread->md.handle ) != -1)        return PR_SUCCESS;    return PR_FAILURE;}