vbox的更動 25711 路徑 trunk/src/VBox/Runtime/r3/linux
- 時間撮記:
- 2010-1-11 上午11:15:04 (15 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r3/linux/semmutex-linux.cpp
r25704 r25711 107 107 108 108 109 RTDECL(int) RTSemMutexCreate(PRTSEMMUTEX pMutexSem) 110 { 109 #undef RTSemMutexCreate 110 RTDECL(int) RTSemMutexCreate(PRTSEMMUTEX phMutexSem) 111 { 112 return RTSemMutexCreateEx(phMutexSem, 0 /*fFlags*/, NIL_RTLOCKVALCLASS, RTLOCKVAL_SUB_CLASS_NONE, NULL); 113 } 114 115 116 RTDECL(int) RTSemMutexCreateEx(PRTSEMMUTEX phMutexSem, uint32_t fFlags, 117 RTLOCKVALCLASS hClass, uint32_t uSubClass, const char *pszNameFmt, ...) 118 { 119 AssertReturn(!(fFlags & ~RTSEMMUTEX_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER); 120 111 121 /* 112 122 * Allocate semaphore handle. … … 120 130 pThis->cNesting = 0; 121 131 #ifdef RTSEMMUTEX_STRICT 122 RTLockValidatorRecExclInit(&pThis->ValidatorRec, NIL_RTLOCKVALCLASS, RTLOCKVAL_SUB_CLASS_NONE, pThis, 123 true /*fEnabled*/, "RTSemMutex"); 124 #endif 125 126 *pMutexSem = pThis; 132 va_list va; 133 va_start(va, pszNameFmt); 134 RTLockValidatorRecExclInitV(&pThis->ValidatorRec, hClass, uSubClass, pThis, 135 !(fFlags & RTSEMMUTEX_FLAGS_NO_LOCK_VAL), pszNameFmt, va); 136 va_end(va); 137 #endif 138 139 *phMutexSem = pThis; 127 140 return VINF_SUCCESS; 128 141 } … … 165 178 RTMemFree(pThis); 166 179 return VINF_SUCCESS; 180 } 181 182 183 RTDECL(uint32_t) RTSemMutexSetSubClass(RTSEMMUTEX hMutexSem, uint32_t uSubClass) 184 { 185 #ifdef RTSEMMUTEX_STRICT 186 /* 187 * Validate. 188 */ 189 RTSEMMUTEXINTERNAL *pThis = hMutexSem; 190 AssertPtrReturn(pThis, RTLOCKVAL_SUB_CLASS_INVALID); 191 AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, RTLOCKVAL_SUB_CLASS_INVALID); 192 193 return RTLockValidatorRecExclSetSubClass(&pThis->ValidatorRec, uSubClass); 194 #else 195 return RTLOCKVAL_SUB_CLASS_INVALID; 196 #endif 167 197 } 168 198
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器