Changeset 20008 in vbox for trunk/src/VBox/Runtime/generic
- Timestamp:
- May 25, 2009 6:34:43 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 47728
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/generic/critsect-generic.cpp
r19989 r20008 251 251 */ 252 252 pCritSect->cNestings = 1; 253 ASMAtomic XchgSize(&pCritSect->NativeThreadOwner, NativeThreadSelf);253 ASMAtomicWriteHandle(&pCritSect->NativeThreadOwner, NativeThreadSelf); 254 254 #ifdef RTCRITSECT_STRICT 255 255 pCritSect->Strict.pszEnterFile = pszFile; 256 256 pCritSect->Strict.u32EnterLine = uLine; 257 257 pCritSect->Strict.uEnterId = uId; 258 ASMAtomic XchgSize(&pCritSect->Strict.ThreadOwner, (RTUINTPTR)ThreadSelf); /* screw gcc and its pedantic warnings. */258 ASMAtomicWriteHandle(&pCritSect->Strict.ThreadOwner, ThreadSelf); 259 259 #endif 260 260 … … 319 319 { 320 320 #ifdef RTCRITSECT_STRICT 321 rtThreadBlocking(ThreadSelf, RTTHREADSTATE_CRITSECT, (uintptr_t)pCritSect, pszFile, uLine, uId);321 RTThreadBlocking(ThreadSelf, RTTHREADSTATE_CRITSECT, (uintptr_t)pCritSect, pszFile, uLine, uId); 322 322 #endif 323 323 int rc = RTSemEventWait(pCritSect->EventSem, RT_INDEFINITE_WAIT); 324 324 #ifdef RTCRITSECT_STRICT 325 rtThreadUnblocked(ThreadSelf, RTTHREADSTATE_CRITSECT);325 RTThreadUnblocked(ThreadSelf, RTTHREADSTATE_CRITSECT); 326 326 #endif 327 327 if (pCritSect->u32Magic != RTCRITSECT_MAGIC) … … 338 338 */ 339 339 pCritSect->cNestings = 1; 340 ASMAtomic XchgSize(&pCritSect->NativeThreadOwner, NativeThreadSelf);340 ASMAtomicWriteHandle(&pCritSect->NativeThreadOwner, NativeThreadSelf); 341 341 #ifdef RTCRITSECT_STRICT 342 342 pCritSect->Strict.pszEnterFile = pszFile; 343 343 pCritSect->Strict.u32EnterLine = uLine; 344 344 pCritSect->Strict.uEnterId = uId; 345 ASMAtomic XchgSize(&pCritSect->Strict.ThreadOwner, (RTUINTPTR)ThreadSelf); /* screw gcc and its pedantic warnings. */345 ASMAtomicWriteHandle(&pCritSect->Strict.ThreadOwner, ThreadSelf); 346 346 RTThreadWriteLockInc(ThreadSelf); 347 347 #endif … … 383 383 if (pCritSect->Strict.ThreadOwner != NIL_RTTHREAD) /* May happen for PDMCritSects when entering GC/R0. */ 384 384 RTThreadWriteLockDec(pCritSect->Strict.ThreadOwner); 385 ASMAtomic XchgSize(&pCritSect->Strict.ThreadOwner, NIL_RTTHREAD);386 #endif 387 ASMAtomic XchgSize(&pCritSect->NativeThreadOwner, NIL_RTNATIVETHREAD);385 ASMAtomicWriteHandle(&pCritSect->Strict.ThreadOwner, NIL_RTTHREAD); 386 #endif 387 ASMAtomicWriteHandle(&pCritSect->NativeThreadOwner, NIL_RTNATIVETHREAD); 388 388 if (ASMAtomicDecS32(&pCritSect->cLockers) >= 0) 389 389 {
Note:
See TracChangeset
for help on using the changeset viewer.