VirtualBox

Changeset 66120 in vbox for trunk/src/VBox/Runtime/r3/win


Ignore:
Timestamp:
Mar 15, 2017 7:59:48 PM (8 years ago)
Author:
vboxsync
Message:

IPRT/RTThreadWait: Quick and dirty workaround for Ctrl-C deadlock with VirtualBox.exe.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/thread-win.cpp

    r62592 r66120  
    3030*********************************************************************************************************************************/
    3131#define LOG_GROUP RTLOGGROUP_THREAD
    32 #include <iprt/win/windows.h>
     32#include <iprt/nt/nt-and-windows.h>
    3333
    3434#include <errno.h>
     
    279279
    280280
     281DECLHIDDEN(bool) rtThreadNativeIsAliveKludge(PRTTHREADINT pThread)
     282{
     283    PPEB_COMMON pPeb = NtCurrentPeb();
     284    if (!pPeb || !pPeb->Ldr || !pPeb->Ldr->ShutdownInProgress)
     285        return true;
     286    DWORD rcWait = WaitForSingleObject((HANDLE)pThread->hThread, 0);
     287    return rcWait != WAIT_OBJECT_0;
     288}
     289
     290
    281291RTDECL(RTTHREAD) RTThreadSelf(void)
    282292{
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette