Changeset 25736 in vbox
- Timestamp:
- Jan 11, 2010 5:16:46 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/AutoLock.cpp
r25408 r25736 252 252 { 253 253 m = new Data(); 254 /** @todo Lock order validation: There are two options here: 255 * -# Use one RTLOCKVALCLASS (share it with WriteLockHandle) and then use 256 * sub-classes (integers) to deal with lock ordering. 257 * -# Use different classes (RTLOCKVALCLASS) for each object and only use 258 * sub-classes to deal with things like the media tree. 259 */ 260 254 261 int vrc = RTSemRWCreate(&m->sem); 255 262 AssertRC(vrc); … … 276 283 validateLock(LOCKVAL_SRC_POS_ARGS); 277 284 #endif 285 #if defined(RT_STRICT) && defined(VBOX_WITH_DEBUG_LOCK_VALIDATOR) 286 int vrc = RTSemRWRequestWriteDebug(m->sem, RT_INDEFINITE_WAIT, (uintptr_t)ASMReturnAddress(), RT_SRC_POS_ARGS); 287 #elif defined(RT_STRICT) 288 int vrc = RTSemRWRequestWriteDebug(m->sem, RT_INDEFINITE_WAIT, (uintptr_t)ASMReturnAddress(), RT_SRC_POS); 289 #else 278 290 int vrc = RTSemRWRequestWrite(m->sem, RT_INDEFINITE_WAIT); 291 #endif 279 292 AssertRC(vrc); 280 293 } … … 295 308 validateLock(LOCKVAL_SRC_POS_ARGS); 296 309 #endif 310 #if defined(RT_STRICT) && defined(VBOX_WITH_DEBUG_LOCK_VALIDATOR) 311 int vrc = RTSemRWRequestReadDebug(m->sem, RT_INDEFINITE_WAIT, (uintptr_t)ASMReturnAddress(), RT_SRC_POS_ARGS); 312 #elif defined(RT_STRICT) 313 int vrc = RTSemRWRequestReadDebug(m->sem, RT_INDEFINITE_WAIT, (uintptr_t)ASMReturnAddress(), RT_SRC_POS); 314 #else 297 315 int vrc = RTSemRWRequestRead(m->sem, RT_INDEFINITE_WAIT); 316 #endif 298 317 AssertRC(vrc); 299 318 } … … 310 329 /*virtual*/ uint32_t RWLockHandle::writeLockLevel() const 311 330 { 331 /* Note! This does not include read recursions done by the writer! */ 312 332 return RTSemRWGetWriteRecursion(m->sem); 313 333 }
Note:
See TracChangeset
for help on using the changeset viewer.