Changeset 25711 in vbox for trunk/src/VBox/Runtime/r3/os2
- Timestamp:
- Jan 11, 2010 11:15:04 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 56449
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/os2/sems-os2.cpp
r25640 r25711 233 233 234 234 235 RTDECL(int) RTSemMutexCreate(PRTSEMMUTEX pMutexSem) 236 { 235 #undef RTSemMutexCreate 236 RTDECL(int) RTSemMutexCreate(PRTSEMMUTEX phMutexSem) 237 { 238 return RTSemMutexCreateEx(phMutexSem, 0 /*fFlags*/, NIL_RTLOCKVALCLASS, RTLOCKVAL_SUB_CLASS_NONE, NULL); 239 } 240 241 242 RTDECL(int) RTSemMutexCreateEx(PRTSEMMUTEX phMutexSem, uint32_t fFlags, 243 RTLOCKVALCLASS hClass, uint32_t uSubClass, const char *pszNameFmt, ...) 244 { 245 AssertReturn(!(fFlags & ~RTSEMMUTEX_FLAGS_NO_LOCK_VAL), VERR_INVALID_PARAMETER); 246 237 247 /* 238 248 * Create the semaphore. … … 242 252 if (!rc) 243 253 { 244 *pMutexSem = (RTSEMMUTEX)(void *)hmtx; 254 /** @todo implement lock validation of OS/2 mutex semaphores. */ 255 *phMutexSem = (RTSEMMUTEX)(void *)hmtx; 245 256 return VINF_SUCCESS; 246 257 } … … 260 271 AssertMsgFailed(("Destroy MutexSem %p failed, rc=%d\n", MutexSem, rc)); 261 272 return RTErrConvertFromOS2(rc); 273 } 274 275 276 277 RTDECL(uint32_t) RTSemMutexSetSubClass(RTSEMMUTEX hMutexSem, uint32_t uSubClass) 278 { 279 #if 0 /** @todo def RTSEMMUTEX_STRICT */ 280 /* 281 * Validate. 282 */ 283 RTSEMMUTEXINTERNAL *pThis = hMutexSem; 284 AssertPtrReturn(pThis, RTLOCKVAL_SUB_CLASS_INVALID); 285 AssertReturn(pThis->u32Magic == RTSEMMUTEX_MAGIC, RTLOCKVAL_SUB_CLASS_INVALID); 286 287 return RTLockValidatorRecExclSetSubClass(&pThis->ValidatorRec, uSubClass); 288 #else 289 return RTLOCKVAL_SUB_CLASS_INVALID; 290 #endif 262 291 } 263 292
Note:
See TracChangeset
for help on using the changeset viewer.