VirtualBox

vbox的更動 25607 路徑 trunk/src/VBox/Runtime/generic


忽略:
時間撮記:
2009-12-31 下午01:21:39 (15 年 以前)
作者:
vboxsync
訊息:

iprt,pdmcritsect: Shortening and cleaning up the lock validator structure names.

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Runtime/generic/critsect-generic.cpp

    r25604 r25607  
    6969    pCritSect->cLockers             = -1;
    7070    pCritSect->NativeThreadOwner    = NIL_RTNATIVETHREAD;
    71     int rc = RTLockValidatorRecCreate(&pCritSect->pValidatorRec, NIL_RTLOCKVALIDATORCLASS, 0, "RTCritSect", pCritSect);
     71    int rc = RTLockValidatorRecExclCreate(&pCritSect->pValidatorRec, NIL_RTLOCKVALIDATORCLASS, 0, "RTCritSect", pCritSect);
    7272    if (RT_SUCCESS(rc))
    7373    {
     
    7575        if (RT_SUCCESS(rc))
    7676            return VINF_SUCCESS;
    77         RTLockValidatorRecDestroy(&pCritSect->pValidatorRec);
     77        RTLockValidatorRecExclDestroy(&pCritSect->pValidatorRec);
    7878    }
    7979
     
    8686
    8787
    88 DECL_FORCE_INLINE(int) rtCritSectTryEnter(PRTCRITSECT pCritSect, PCRTLOCKVALIDATORSRCPOS pSrcPos)
     88DECL_FORCE_INLINE(int) rtCritSectTryEnter(PRTCRITSECT pCritSect, PCRTLOCKVALSRCPOS pSrcPos)
    8989{
    9090    Assert(pCritSect);
     
    137137    return rtCritSectTryEnter(pCritSect, NULL);
    138138#else
    139     RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_NORMAL_API();
     139    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    140140    return rtCritSectTryEnter(pCritSect, &SrcPos);
    141141#endif
     
    146146RTDECL(int) RTCritSectTryEnterDebug(PRTCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    147147{
    148     RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_DEBUG_API();
     148    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    149149    return rtCritSectTryEnter(pCritSect, &SrcPos);
    150150}
     
    152152
    153153
    154 DECL_FORCE_INLINE(int) rtCritSectEnter(PRTCRITSECT pCritSect, PCRTLOCKVALIDATORSRCPOS pSrcPos)
     154DECL_FORCE_INLINE(int) rtCritSectEnter(PRTCRITSECT pCritSect, PCRTLOCKVALSRCPOS pSrcPos)
    155155{
    156156    Assert(pCritSect);
     
    238238    return rtCritSectEnter(pCritSect, NULL);
    239239#else
    240     RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_NORMAL_API();
     240    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    241241    return rtCritSectEnter(pCritSect, &SrcPos);
    242242#endif
     
    247247RTDECL(int) RTCritSectEnterDebug(PRTCRITSECT pCritSect, RTHCUINTPTR uId, RT_SRC_POS_DECL)
    248248{
    249     RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_DEBUG_API();
     249    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    250250    return rtCritSectEnter(pCritSect, &SrcPos);
    251251}
     
    294294
    295295
    296 static int rtCritSectEnterMultiple(size_t cCritSects, PRTCRITSECT *papCritSects, PCRTLOCKVALIDATORSRCPOS pSrcPos)
     296static int rtCritSectEnterMultiple(size_t cCritSects, PRTCRITSECT *papCritSects, PCRTLOCKVALSRCPOS pSrcPos)
    297297{
    298298    Assert(cCritSects > 0);
     
    377377    return rtCritSectEnterMultiple(cCritSects, papCritSects, NULL);
    378378#else
    379     RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_NORMAL_API();
     379    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_NORMAL_API();
    380380    return rtCritSectEnterMultiple(cCritSects, papCritSects, &SrcPos);
    381381#endif
     
    386386RTDECL(int) RTCritSectEnterMultipleDebug(size_t cCritSects, PRTCRITSECT *papCritSects, RTUINTPTR uId, RT_SRC_POS_DECL)
    387387{
    388     RTLOCKVALIDATORSRCPOS SrcPos = RTLOCKVALIDATORSRCPOS_INIT_DEBUG_API();
     388    RTLOCKVALSRCPOS SrcPos = RTLOCKVALSRCPOS_INIT_DEBUG_API();
    389389    return rtCritSectEnterMultiple(cCritSects, papCritSects, &SrcPos);
    390390}
     
    435435    AssertRC(rc);
    436436
    437     RTLockValidatorRecDestroy(&pCritSect->pValidatorRec);
     437    RTLockValidatorRecExclDestroy(&pCritSect->pValidatorRec);
    438438
    439439    return rc;
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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