VirtualBox

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


Ignore:
Timestamp:
Jan 4, 2010 4:08:04 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56338
Message:

iprt,pdmcritsect: Added RTSemEvent[Set|Add|Remove]Signaller so that we can validate who is signalling an event if we like and, more importantly, detect deadlocks involving event semaphores. More attempts at dealing with the races (and bugs) in the all-other-threads-blocking detection in tstRTLockValidator.cpp, adding RTThreadGetReallySleeping and RTThreadGetNativeState in the process.

Location:
trunk/src/VBox/Runtime/r3/win
Files:
2 edited

Legend:

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

    r25381 r25638  
    124124}
    125125
     126
     127RTDECL(void) RTSemEventSetSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
     128{
     129/** @todo implement RTSemEventSetSignaller and friends for NT. */
     130}
     131
     132
     133RTDECL(void) RTSemEventAddSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
     134{
     135
     136}
     137
     138
     139RTDECL(void) RTSemEventRemoverSignaller(RTSEMEVENT hEventSem, RTTHREAD hThread)
     140{
     141
     142}
     143
  • trunk/src/VBox/Runtime/r3/win/semmutex-win.cpp

    r25628 r25638  
    182182#ifdef RTSEMMUTEX_STRICT
    183183        hThreadSelf = RTThreadSelfAutoAdopt();
    184         int rc9 = RTLockValidatorRecExclCheckOrderAndBlocking(&pThis->ValidatorRec, hThreadSelf, pSrcPos, true, RTTHREADSTATE_MUTEX);
     184        int rc9 = RTLockValidatorRecExclCheckOrderAndBlocking(&pThis->ValidatorRec, hThreadSelf, pSrcPos, true,
     185                                                              RTTHREADSTATE_MUTEX, true);
    185186        if (RT_FAILURE(rc9))
    186187            return rc9;
    187188#else
    188189        hThreadSelf = RTThreadSelf();
    189         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_MUTEX);
     190        RTThreadBlocking(hThreadSelf, RTTHREADSTATE_MUTEX, true);
    190191#endif
    191192    }
Note: See TracChangeset for help on using the changeset viewer.

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