Changeset 101968 in vbox for trunk/src/libs/xpcom18a4
- Timestamp:
- Nov 8, 2023 12:48:34 PM (15 months ago)
- Location:
- trunk/src/libs/xpcom18a4/nsprpub/pr
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h
r101964 r101968 333 333 PRLock *lock; /* associated lock that protects the condition */ 334 334 pthread_cond_t cv; /* underlying pthreads condition */ 335 PRInt32notify_pending; /* CV has destroy pending notification */335 volatile uint32_t notify_pending; /* CV has destroy pending notification */ 336 336 }; 337 337 -
trunk/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptsynch.c
r101904 r101968 48 48 #include <sys/time.h> 49 49 50 #include <iprt/asm.h> 51 50 52 #ifdef VBOX 51 53 /* From the removed obsolete/prsem.h */ … … 133 135 #if defined(DEBUG) 134 136 pt_debug.cvars_notified += 1; 135 if (0 > PR_AtomicDecrement(&cv->notify_pending))137 if (0 > ASMAtomicDecU32(&cv->notify_pending)) 136 138 { 137 139 pt_debug.delayed_cv_deletes += 1; … … 139 141 } 140 142 #else /* defined(DEBUG) */ 141 if (0 > PR_AtomicDecrement(&cv->notify_pending))143 if (0 > ASMAtomicDecU32(&cv->notify_pending)) 142 144 PR_DestroyCondVar(cv); 143 145 #endif /* defined(DEBUG) */ … … 306 308 307 309 /* A brand new entry in the array */ 308 (void) PR_AtomicIncrement(&cvar->notify_pending);310 (void)ASMAtomicIncU32(&cvar->notify_pending); 309 311 notified->cv[index].times = (broadcast) ? -1 : 1; 310 312 notified->cv[index].cv = cvar; … … 335 337 PR_IMPLEMENT(void) PR_DestroyCondVar(PRCondVar *cvar) 336 338 { 337 if (0 > PR_AtomicDecrement(&cvar->notify_pending))339 if (0 > ASMAtomicDecU32(&cvar->notify_pending)) 338 340 { 339 341 PRIntn rv = pthread_cond_destroy(&cvar->cv); PR_ASSERT(0 == rv); -
trunk/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptthread.c
r101963 r101968 50 50 #include <signal.h> 51 51 52 #include <iprt/asm.h> 52 53 #include <iprt/thread.h> 53 54 #include <iprt/mem.h> … … 498 499 { 499 500 PRIntn rv; 500 (void)PR_AtomicIncrement(&cv->notify_pending);501 ASMAtomicIncU32(&cv->notify_pending); 501 502 rv = pthread_cond_broadcast(&cv->cv); 502 503 PR_ASSERT(0 == rv); 503 if (0 > PR_AtomicDecrement(&cv->notify_pending))504 if (0 > ASMAtomicDecU32(&cv->notify_pending)) 504 505 PR_DestroyCondVar(cv); 505 506 }
Note:
See TracChangeset
for help on using the changeset viewer.