VirtualBox

Changeset 25398 in vbox


Ignore:
Timestamp:
Dec 15, 2009 12:58:08 PM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
56024
Message:

IPRT,PDMAllocCritSect: Don't bitch when recursivly entering a mutex.

Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/iprt/lockvalidator.h

    r25373 r25398  
    166166RTDECL(int)  RTLockValidatorCheckOrder(PRTLOCKVALIDATORREC pRec, RTTHREAD hThread, RTHCUINTPTR uId, RT_SRC_POS_DECL);
    167167
    168 
    169 /**
    170  * Record the specified thread as lock owner.
    171  *
    172  * This is typically called after acquiring the lock.
    173  *
    174  * @returns hThread resolved.  Can return NIL_RTHREAD iff we fail to adopt the
    175  *          alien thread or if pRec is invalid.
     168/**
     169 * Check the exit order.
     170 *
     171 * This is called by routines implementing lock acquisition.
     172 *
     173 * @retval  VINF_SUCCESS on success.
     174 * @retval  VERR_DEADLOCK if the order is wrong, after having whined and
     175 *          asserted.
    176176 *
    177177 * @param   pRec                The validator record.
     
    187187 *                              from.  Optional.
    188188 */
     189RTDECL(int)  RTLockValidatorCheckReleaseOrder(PRTLOCKVALIDATORREC pRec, RTTHREAD hThread);
     190
     191/**
     192 * Record the specified thread as lock owner.
     193 *
     194 * This is typically called after acquiring the lock.
     195 *
     196 * @returns hThread resolved.  Can return NIL_RTHREAD iff we fail to adopt the
     197 *          alien thread or if pRec is invalid.
     198 *
     199 * @param   pRec                The validator record.
     200 * @param   hThread             The handle of the calling thread.  If not known,
     201 *                              pass NIL_RTTHREAD and this method will figure it
     202 *                              out.
     203 * @param   uId                 Some kind of locking location ID.  Typically a
     204 *                              return address up the stack.  Optional (0).
     205 * @param   pszFile             The file where the lock is being acquired from.
     206 *                              Optional.
     207 * @param   iLine               The line number in that file.  Optional (0).
     208 * @param   pszFunction         The functionn where the lock is being acquired
     209 *                              from.  Optional.
     210 */
    189211RTDECL(RTTHREAD) RTLockValidatorSetOwner(PRTLOCKVALIDATORREC pRec, RTTHREAD hThread, RTHCUINTPTR uId, RT_SRC_POS_DECL);
    190212
  • trunk/include/iprt/thread.h

    r25373 r25398  
    632632 * Unblocks a thread.
    633633 *
    634  * This function is paired with rtThreadBlocking.
     634 * This function is paired with RTThreadBlocking and RTThreadBlockingDebug.
    635635 *
    636636 * @param   hThread     The current thread.
     
    641641
    642642/**
     643 * Change the thread state to blocking.
     644 *
     645 * @param   hThread         The current thread.
     646 * @param   enmState        The sleep state.
     647 */
     648RTDECL(void) RTThreadBlocking(RTTHREAD hThread, RTTHREADSTATE enmState);
     649
     650/**
    643651 * Change the thread state to blocking and do deadlock detection.
    644652 *
     
    648656 * @param   enmState        The sleep state.
    649657 * @param   pvBlock         Pointer to a RTLOCKVALIDATORREC structure.
     658 * @param   fRecursiveOk    Whether it's ok to recurse.
    650659 * @param   uId             Where we are blocking.
    651660 * @param   RT_SRC_POS_DECL Where we are blocking.
    652  */
    653 RTDECL(void) RTThreadBlocking(RTTHREAD hThread, RTTHREADSTATE enmState,
    654                               PRTLOCKVALIDATORREC pValidatorRec, RTHCUINTPTR uId, RT_SRC_POS_DECL);
     661 *
     662 * @todo    Move this to RTLockValidator.
     663 */
     664RTDECL(void) RTThreadBlockingDebug(RTTHREAD hThread, RTTHREADSTATE enmState, bool fRecursiveOk,
     665                                   PRTLOCKVALIDATORREC pValidatorRec, RTHCUINTPTR uId, RT_SRC_POS_DECL);
    655666
    656667
  • trunk/src/VBox/Runtime/common/misc/thread.cpp

    r25373 r25398  
    15451545
    15461546/**
    1547  * Change the thread state to blocking and do deadlock detection.
    1548  *
    1549  * This is a RT_STRICT method for debugging locks and detecting deadlocks.
     1547 * Change the thread state to blocking.
    15501548 *
    15511549 * @param   hThread         The current thread.
    15521550 * @param   enmState        The sleep state.
    1553  * @param   pvBlock         Pointer to a RTLOCKVALIDATORREC structure.
    1554  * @param   uId             Where we are blocking.
    1555  * @param   RT_SRC_POS_DECL Where we are blocking.
    1556  */
    1557 RTDECL(void) RTThreadBlocking(RTTHREAD hThread, RTTHREADSTATE enmState,
    1558                               PRTLOCKVALIDATORREC pValidatorRec, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     1551 */
     1552RTDECL(void) RTThreadBlocking(RTTHREAD hThread, RTTHREADSTATE enmState)
    15591553
    15601554{
     
    15701564        return;
    15711565
    1572     if (!pValidatorRec)
    1573         /*
    1574          * If no validator record, just update the thread state.
    1575          */
    1576         rtThreadSetState(pThread, enmState);
    1577     else
    1578     {
    1579         /*
    1580          * Record the location and everything before changing the state and
    1581          * performing deadlock detection.
    1582          */
    1583         /** @todo This has to be serialized! The deadlock detection isn't 100% safe!!! */
    1584         pThread->Block.pRec         = pValidatorRec;
    1585         pThread->pszBlockFunction   = pszFunction;
    1586         pThread->pszBlockFile       = pszFile;
    1587         pThread->uBlockLine         = iLine;
    1588         pThread->uBlockId           = uId;
    1589         rtThreadSetState(pThread, enmState);
    1590 
     1566    /*
     1567     * Do the job.
     1568     */
     1569    rtThreadSetState(pThread, enmState);
     1570}
     1571
     1572
     1573/**
     1574 * Change the thread state to blocking and do deadlock detection.
     1575 *
     1576 * This is a RT_STRICT method for debugging locks and detecting deadlocks.
     1577 *
     1578 * @param   hThread         The current thread.
     1579 * @param   enmState        The sleep state.
     1580 * @param   pvBlock         Pointer to a RTLOCKVALIDATORREC structure.
     1581 * @param   fRecursiveOk    Whether it's ok to recurse.
     1582 * @param   uId             Where we are blocking.
     1583 * @param   RT_SRC_POS_DECL Where we are blocking.
     1584 *
     1585 * @todo    Move this to RTLockValidator.
     1586 */
     1587RTDECL(void) RTThreadBlockingDebug(RTTHREAD hThread, RTTHREADSTATE enmState, bool fRecursiveOk,
     1588                                   PRTLOCKVALIDATORREC pValidatorRec, RTHCUINTPTR uId, RT_SRC_POS_DECL)
     1589
     1590{
     1591    /*
     1592     * Fend off wild life.
     1593     */
     1594    AssertReturnVoid(RTTHREAD_IS_SLEEPING(enmState));
     1595    AssertPtrReturnVoid(pValidatorRec);
     1596    AssertReturnVoid(pValidatorRec->u32Magic == RTLOCKVALIDATORREC_MAGIC);
     1597    PRTTHREADINT pThread = hThread;
     1598    AssertPtrReturnVoid(pThread);
     1599    AssertReturnVoid(pThread->u32Magic == RTTHREADINT_MAGIC);
     1600    AssertReturnVoid(rtThreadGetState(pThread) == RTTHREADSTATE_RUNNING);
     1601
     1602    /*
     1603     * Record the location and everything before changing the state and
     1604     * performing deadlock detection.
     1605     */
     1606    /** @todo This has to be serialized! The deadlock detection isn't 100% safe!!! */
     1607    pThread->Block.pRec         = pValidatorRec;
     1608    pThread->pszBlockFunction   = pszFunction;
     1609    pThread->pszBlockFile       = pszFile;
     1610    pThread->uBlockLine         = iLine;
     1611    pThread->uBlockId           = uId;
     1612    rtThreadSetState(pThread, enmState);
     1613
     1614    /*
     1615     * Don't do deadlock detection if we're recursing and that's OK.
     1616     *
     1617     * On some hosts we don't do recursion accounting our selves and there
     1618     * isn't any other place to check for this.  semmutex-win.cpp for instance.
     1619     */
     1620    if (    !fRecursiveOk
     1621        ||  pValidatorRec->hThread != pThread)
     1622    {
    15911623        /*
    15921624         * Do deadlock detection.
  • trunk/src/VBox/Runtime/generic/critsect-generic.cpp

    r25373 r25398  
    321321        for (;;)
    322322        {
    323             RTThreadBlocking(hThreadSelf, RTTHREADSTATE_CRITSECT, RTCRITSECT_STRICT_BLOCK_ARGS(pCritSect->pValidatorRec));
     323            RTCRITSECT_STRICT_BLOCK(hThreadSelf, pCritSect->pValidatorRec, !(pCritSect->fFlags & RTCRITSECT_FLAGS_NO_NESTING));
    324324            int rc = RTSemEventWait(pCritSect->EventSem, RT_INDEFINITE_WAIT);
    325             RTThreadUnblocked(hThreadSelf, RTTHREADSTATE_CRITSECT);
     325            RTCRITSECT_STRICT_UNBLOCK(hThreadSelf);
    326326            if (pCritSect->u32Magic != RTCRITSECT_MAGIC)
    327327                return VERR_SEM_DESTROYED;
  • trunk/src/VBox/Runtime/include/internal/strict.h

    r25373 r25398  
    4343
    4444#ifdef RTCRITSECT_STRICT
    45 # define RTCRITSECT_STRICT_POS_DECL         RTHCUINTPTR uId, RT_SRC_POS_DECL
    46 # define RTCRITSECT_STRICT_POS_ARGS         uId, RT_SRC_POS_ARGS
    47 # define RTCRITSECT_STRICT_BLOCK_ARGS(pRec) pRec,     uId, RT_SRC_POS_ARGS
     45# define RTCRITSECT_STRICT_POS_DECL             RTHCUINTPTR uId, RT_SRC_POS_DECL
     46# define RTCRITSECT_STRICT_POS_ARGS             uId, RT_SRC_POS_ARGS
     47# define RTCRITSECT_STRICT_BLOCK(hThread, pRec, fRecursive) \
     48                                                RTThreadBlockingDebug((hThread), RTTHREADSTATE_CRITSECT, fRecursive, pRec, uId, RT_SRC_POS_ARGS)
    4849#else
    49 # define RTCRITSECT_STRICT_POS_DECL         int iDummy
    50 # define RTCRITSECT_STRICT_POS_ARGS         0
    51 # define RTCRITSECT_STRICT_BLOCK_ARGS(pRec) NULL, 0, NULL, 0, NULL
     50# define RTCRITSECT_STRICT_POS_DECL             int iDummy
     51# define RTCRITSECT_STRICT_POS_ARGS             0
     52# define RTCRITSECT_STRICT_BLOCK(hThread, pRec, fRecursive) \
     53                                                RTThreadBlocking((hThread), RTTHREADSTATE_CRITSECT)
    5254#endif
     55#define  RTCRITSECT_STRICT_UNBLOCK(hThread)     RTThreadUnblocked((hThread), RTTHREADSTATE_CRITSECT)
    5356
    5457
     
    6164
    6265#ifdef RTSEMMUTEX_STRICT
    63 # define RTSEMMUTEX_STRICT_POS_DECL         RTHCUINTPTR uId, RT_SRC_POS_DECL
    64 # define RTSEMMUTEX_STRICT_POS_ARGS         uId, RT_SRC_POS_ARGS
    65 # define RTSEMMUTEX_STRICT_BLOCK_ARGS(pRec) pRec,     uId, RT_SRC_POS_ARGS
     66# define RTSEMMUTEX_STRICT_POS_DECL             RTHCUINTPTR uId, RT_SRC_POS_DECL
     67# define RTSEMMUTEX_STRICT_POS_ARGS             uId, RT_SRC_POS_ARGS
     68# define RTSEMMUTEX_STRICT_BLOCK(hThread, pRec) RTThreadBlockingDebug((hThread), RTTHREADSTATE_MUTEX, true, pRec, uId, RT_SRC_POS_ARGS)
    6669#else
    67 # define RTSEMMUTEX_STRICT_POS_DECL         int iDummy
    68 # define RTSEMMUTEX_STRICT_POS_ARGS         0
    69 # define RTSEMMUTEX_STRICT_BLOCK_ARGS(pRec) NULL, 0, NULL, 0, NULL
     70# define RTSEMMUTEX_STRICT_POS_DECL             int iDummy
     71# define RTSEMMUTEX_STRICT_POS_ARGS             0
     72# define RTSEMMUTEX_STRICT_BLOCK(hThread, pRec) RTThreadBlocking((hThread), RTTHREADSTATE_MUTEX)
    7073#endif
     74#define  RTSEMMUTEX_STRICT_UNBLOCK(hThread)     RTThreadUnblocked((hThread), RTTHREADSTATE_MUTEX)
    7175
    7276
  • trunk/src/VBox/Runtime/r3/linux/semmutex-linux.cpp

    r25378 r25398  
    229229             */
    230230            if (pTimeout && ( pTimeout->tv_sec || pTimeout->tv_nsec ))
    231                 RTThreadBlocking(hThreadSelf, RTTHREADSTATE_MUTEX, RTSEMMUTEX_STRICT_BLOCK_ARGS(&pThis->ValidatorRec));
     231                RTSEMMUTEX_STRICT_BLOCK(hThreadSelf, &pThis->ValidatorRec);
    232232            long rc = sys_futex(&pThis->iState, FUTEX_WAIT, 2, pTimeout, NULL, 0);
    233             RTThreadUnblocked(hThreadSelf, RTTHREADSTATE_MUTEX);
     233            RTSEMMUTEX_STRICT_UNBLOCK(hThreadSelf);
    234234            if (RT_UNLIKELY(pThis->u32Magic != RTSEMMUTEX_MAGIC))
    235235                return VERR_SEM_DESTROYED;
  • trunk/src/VBox/Runtime/r3/posix/semmutex-posix.cpp

    r25378 r25398  
    189189    {
    190190        /* take mutex */
    191         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_MUTEX, RTSEMMUTEX_STRICT_BLOCK_ARGS(&pThis->ValidatorRec));
     191        RTSEMMUTEX_STRICT_BLOCK(hThreadSelf, &pThis->ValidatorRec);
    192192        int rc = pthread_mutex_lock(&pThis->Mutex);
    193         RTThreadUnblocked(hThreadSelf, RTTHREADSTATE_MUTEX);
     193        RTSEMMUTEX_STRICT_UNBLOCK(hThreadSelf);
    194194        if (rc)
    195195        {
     
    218218                ts.tv_sec++;
    219219            }
    220             RTThreadBlocking(hThreadSelf, RTTHREADSTATE_MUTEX, RTSEMMUTEX_STRICT_BLOCK_ARGS(&pThis->ValidatorRec));
     220            RTSEMMUTEX_STRICT_BLOCK(hThreadSelf, &pThis->ValidatorRec);
    221221        }
    222222
    223223        /* take mutex */
    224224        int rc = pthread_mutex_timedlock(&pThis->Mutex, &ts);
    225         RTThreadUnblocked(hThreadSelf, RTTHREADSTATE_MUTEX);
     225        RTSEMMUTEX_STRICT_UNBLOCK(hThreadSelf);
    226226        if (rc)
    227227        {
  • trunk/src/VBox/Runtime/r3/win/semmutex-win.cpp

    r25382 r25398  
    162162     */
    163163    if (cMillies > 0)
    164         RTThreadBlocking(hThreadSelf, RTTHREADSTATE_MUTEX, RTSEMMUTEX_STRICT_BLOCK_ARGS(&pThis->ValidatorRec));
     164        RTSEMMUTEX_STRICT_BLOCK(hThreadSelf, &pThis->ValidatorRec);
    165165    int rc = WaitForSingleObjectEx(pThis->hMtx,
    166166                                   cMillies == RT_INDEFINITE_WAIT ? INFINITE : cMillies,
    167167                                   TRUE /*bAlertable*/);
    168     RTThreadUnblocked(hThreadSelf, RTTHREADSTATE_MUTEX);
     168    RTSEMMUTEX_STRICT_UNBLOCK(hThreadSelf);
    169169    switch (rc)
    170170    {
  • trunk/src/VBox/VMM/VMMAll/PDMAllCritSect.cpp

    r25373 r25398  
    5252
    5353#ifdef PDMCRITSECT_STRICT
    54 # define PDMCRITSECT_STRICT_ARGS_DECL       RTHCUINTPTR uId, RT_SRC_POS_DECL
    55 # define PDMCRITSECT_STRICT_ARGS_PASS_ON    uId, RT_SRC_POS_ARGS
    56 #else
    57 # define PDMCRITSECT_STRICT_ARGS_DECL       int iDummy
    58 # define PDMCRITSECT_STRICT_ARGS_PASS_ON    0
    59 #endif
    60 
     54# define PDMCRITSECT_STRICT_POS_DECL            RTHCUINTPTR uId, RT_SRC_POS_DECL
     55# define PDMCRITSECT_STRICT_POS_ARGS            uId, RT_SRC_POS_ARGS
     56# define PDMCRITSECT_STRICT_BLOCK(hThread, pRec, fRecursive) \
     57                                                RTThreadBlockingDebug((hThread), RTTHREADSTATE_CRITSECT, fRecursive, pRec, uId, RT_SRC_POS_ARGS)
     58#else
     59# define PDMCRITSECT_STRICT_POS_DECL            int iDummy
     60# define PDMCRITSECT_STRICT_POS_ARGS            0
     61# define PDMCRITSECT_STRICT_BLOCK(hThread, pRec, fRecursive) \
     62                                                RTThreadBlocking((hThread), RTTHREADSTATE_CRITSECT)
     63#endif
     64#define  PDMCRITSECT_STRICT_UNBLOCK(hThread)    RTThreadUnblocked((hThread), RTTHREADSTATE_CRITSECT)
    6165
    6266/* Undefine the automatic VBOX_STRICT API mappings. */
     
    9599 * @param   hNativeSelf     The native handle of this thread.
    96100 */
    97 DECL_FORCE_INLINE(int) pdmCritSectEnterFirst(PPDMCRITSECT pCritSect, RTNATIVETHREAD hNativeSelf, PDMCRITSECT_STRICT_ARGS_DECL)
     101DECL_FORCE_INLINE(int) pdmCritSectEnterFirst(PPDMCRITSECT pCritSect, RTNATIVETHREAD hNativeSelf, PDMCRITSECT_STRICT_POS_DECL)
    98102{
    99103    AssertMsg(pCritSect->s.Core.NativeThreadOwner == NIL_RTNATIVETHREAD, ("NativeThreadOwner=%p\n", pCritSect->s.Core.NativeThreadOwner));
     
    104108
    105109# if defined(PDMCRITSECT_STRICT) && defined(IN_RING3)
    106     RTThreadWriteLockInc(RTLockValidatorSetOwner(pCritSect->s.Core.pValidatorRec, NIL_RTTHREAD, PDMCRITSECT_STRICT_ARGS_PASS_ON));
     110    RTThreadWriteLockInc(RTLockValidatorSetOwner(pCritSect->s.Core.pValidatorRec, NIL_RTTHREAD, PDMCRITSECT_STRICT_POS_ARGS));
    107111# endif
    108112
     
    120124 * @param   hNativeSelf         The native thread handle.
    121125 */
    122 static int pdmR3CritSectEnterContended(PPDMCRITSECT pCritSect, RTNATIVETHREAD hNativeSelf, PDMCRITSECT_STRICT_ARGS_DECL)
     126static int pdmR3CritSectEnterContended(PPDMCRITSECT pCritSect, RTNATIVETHREAD hNativeSelf, PDMCRITSECT_STRICT_POS_DECL)
    123127{
    124128    /*
     
    126130     */
    127131    if (ASMAtomicIncS32(&pCritSect->s.Core.cLockers) == 0)
    128         return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     132        return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_POS_ARGS);
    129133    STAM_COUNTER_INC(&pCritSect->s.StatContentionR3);
    130134
     
    140144    for (;;)
    141145    {
    142 # ifdef PDMCRITSECT_STRICT
    143         RTThreadBlocking(hSelf, RTTHREADSTATE_CRITSECT, pCritSect->s.Core.pValidatorRec, 0, NULL, 0, NULL);
    144 # endif
     146        PDMCRITSECT_STRICT_BLOCK(hSelf, pCritSect->s.Core.pValidatorRec, !(pCritSect->s.Core.fFlags & RTCRITSECT_FLAGS_NO_NESTING));
    145147        int rc = SUPSemEventWaitNoResume(pSession, hEvent, RT_INDEFINITE_WAIT);
    146 # ifdef PDMCRITSECT_STRICT
    147         RTThreadUnblocked(hSelf, RTTHREADSTATE_CRITSECT);
    148 # endif
     148        PDMCRITSECT_STRICT_UNBLOCK(hSelf);
    149149        if (RT_UNLIKELY(pCritSect->s.Core.u32Magic != RTCRITSECT_MAGIC))
    150150            return VERR_SEM_DESTROYED;
    151151        if (rc == VINF_SUCCESS)
    152             return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     152            return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_POS_ARGS);
    153153        AssertMsg(rc == VERR_INTERRUPTED, ("rc=%Rrc\n", rc));
    154154    }
     
    169169 *                              and the section is busy.
    170170 */
    171 DECL_FORCE_INLINE(int) pdmCritSectEnter(PPDMCRITSECT pCritSect, int rcBusy, PDMCRITSECT_STRICT_ARGS_DECL)
     171DECL_FORCE_INLINE(int) pdmCritSectEnter(PPDMCRITSECT pCritSect, int rcBusy, PDMCRITSECT_STRICT_POS_DECL)
    172172{
    173173    Assert(pCritSect->s.Core.cNestings < 8);  /* useful to catch incorrect locking */
     
    186186    /* Not owned ... */
    187187    if (ASMAtomicCmpXchgS32(&pCritSect->s.Core.cLockers, 0, -1))
    188         return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     188        return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_POS_ARGS);
    189189
    190190    /* ... or nested. */
     
    206206    {
    207207        if (ASMAtomicCmpXchgS32(&pCritSect->s.Core.cLockers, 0, -1))
    208             return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     208            return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_POS_ARGS);
    209209        ASMNopPause();
    210210        /** @todo Should use monitor/mwait on e.g. &cLockers here, possibly with a
     
    219219     * Take the slow path.
    220220     */
    221     return pdmR3CritSectEnterContended(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     221    return pdmR3CritSectEnterContended(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_POS_ARGS);
    222222#else
    223223    /*
     
    245245{
    246246#ifndef PDMCRITSECT_STRICT
    247     return pdmCritSectEnter(pCritSect, rcBusy, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     247    return pdmCritSectEnter(pCritSect, rcBusy, PDMCRITSECT_STRICT_POS_ARGS);
    248248#else
    249249    /* No need for a second code instance. */
     
    274274{
    275275#ifdef PDMCRITSECT_STRICT
    276     return pdmCritSectEnter(pCritSect, rcBusy, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     276    return pdmCritSectEnter(pCritSect, rcBusy, PDMCRITSECT_STRICT_POS_ARGS);
    277277#else
    278278    /* No need for a second code instance. */
     
    292292 * @param   pCritSect   The critical section.
    293293 */
    294 static int pdmCritSectTryEnter(PPDMCRITSECT pCritSect, PDMCRITSECT_STRICT_ARGS_DECL)
     294static int pdmCritSectTryEnter(PPDMCRITSECT pCritSect, PDMCRITSECT_STRICT_POS_DECL)
    295295{
    296296    /*
     
    307307    /* Not owned ... */
    308308    if (ASMAtomicCmpXchgS32(&pCritSect->s.Core.cLockers, 0, -1))
    309         return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     309        return pdmCritSectEnterFirst(pCritSect, hNativeSelf, PDMCRITSECT_STRICT_POS_ARGS);
    310310
    311311    /* ... or nested. */
     
    346346{
    347347#ifndef PDMCRITSECT_STRICT
    348     return pdmCritSectTryEnter(pCritSect, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     348    return pdmCritSectTryEnter(pCritSect, PDMCRITSECT_STRICT_POS_ARGS);
    349349#else
    350350    /* No need for a second code instance. */
     
    374374{
    375375#ifdef PDMCRITSECT_STRICT
    376     return pdmCritSectTryEnter(pCritSect, PDMCRITSECT_STRICT_ARGS_PASS_ON);
     376    return pdmCritSectTryEnter(pCritSect, PDMCRITSECT_STRICT_POS_ARGS);
    377377#else
    378378    /* No need for a second code instance. */
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