Пример #1
0
static unsigned __stdcall wtfThreadEntryPoint(void* param)
{
    ThreadFunctionInvocation invocation = *static_cast<ThreadFunctionInvocation*>(param);
    delete static_cast<ThreadFunctionInvocation*>(param);

    void* result = invocation.function(invocation.data);

#if !USE(PTHREADS) && OS(WINDOWS)
    // Do the TLS cleanup.
    ThreadSpecificThreadExit();
#endif

    return reinterpret_cast<unsigned>(result);
}
Пример #2
0
static unsigned __stdcall wtfThreadEntryPoint(void* param)
{
    ThreadFunctionInvocation invocation = *static_cast<ThreadFunctionInvocation*>(param);
    delete static_cast<ThreadFunctionInvocation*>(param);

    void* result = invocation.function(invocation.data);

#if PLATFORM(WIN) && USE(PTHREADS)
    // pthreads-win32 knows how to work with threads created with Win32 or CRT functions, so it's OK to mix APIs.
    pthread_exit(result);
#endif

    return reinterpret_cast<unsigned>(result);
}