(unsigned (__stdcall *)(void *))start,
pr_root,
_PR_MD_CREATE_THREAD(PRThread *thread,                   void (*start)(void *),                   PRThreadPriority priority,                   PRThreadScope scope,                   PRThreadState state,                   PRUint32 stackSize){#if 0    thread->md.handle = CreateThread(                    NULL,                             /* security attrib */                    thread->stack->stackSize,         /* stack size      */                    (LPTHREAD_START_ROUTINE)start,    /* startup routine */                    (void *)thread,                   /* thread param    */                    CREATE_SUSPENDED,                 /* create flags    */                    &(thread->id) );                  /* thread id       */#else    thread->md.handle = (HANDLE) _beginthreadex(                    NULL,                    thread->stack->stackSize,                    (unsigned (__stdcall *)(void *))start,                    (void *)thread,                    CREATE_SUSPENDED,                    &(thread->id));#endif    if(!thread->md.handle) {        PRErrorCode prerror;        thread->md.fiber_last_error = GetLastError();        switch (errno) {            case ENOMEM:                prerror = PR_OUT_OF_MEMORY_ERROR;                break;            case EAGAIN:                prerror = PR_INSUFFICIENT_RESOURCES_ERROR;                break;            case EINVAL:                prerror = PR_INVALID_ARGUMENT_ERROR;                break;            default:                prerror = PR_UNKNOWN_ERROR;        }        PR_SetError(prerror, errno);        return PR_FAILURE;    }    thread->md.id = thread->id;    /*     * On windows, a thread is created with a thread priority of     * THREAD_PRIORITY_NORMAL.     */    if (priority != PR_PRIORITY_NORMAL) {        _PR_MD_SET_PRIORITY(&(thread->md), priority);    }    /* Activate the thread */    if ( ResumeThread( thread->md.handle ) != -1)        return PR_SUCCESS;    PR_SetError(PR_UNKNOWN_ERROR, GetLastError());    return PR_FAILURE;}