Changeset 102173 in vbox
- Timestamp:
- Nov 21, 2023 8:18:58 AM (12 months ago)
- Location:
- trunk/src/libs/xpcom18a4/nsprpub/pr
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/nsprpub/pr/include/private/primpl.h
r102007 r102173 333 333 PRLock *lock; /* associated lock that protects the condition */ 334 334 pthread_cond_t cv; /* underlying pthreads condition */ 335 volatile uint32_t notify_pending; /* CV has destroy pending notification */335 volatile int32_t notify_pending; /* CV has destroy pending notification */ 336 336 }; 337 337 -
trunk/src/libs/xpcom18a4/nsprpub/pr/src/pthreads/ptsynch.c
r102000 r102173 136 136 #if defined(DEBUG) 137 137 pt_debug.cvars_notified += 1; 138 if (0 > ASMAtomicDec U32(&cv->notify_pending))138 if (0 > ASMAtomicDecS32(&cv->notify_pending)) 139 139 { 140 140 pt_debug.delayed_cv_deletes += 1; … … 142 142 } 143 143 #else /* defined(DEBUG) */ 144 if (0 > ASMAtomicDec U32(&cv->notify_pending))144 if (0 > ASMAtomicDecS32(&cv->notify_pending)) 145 145 PR_DestroyCondVar(cv); 146 146 #endif /* defined(DEBUG) */ … … 309 309 310 310 /* A brand new entry in the array */ 311 (void)ASMAtomicInc U32(&cvar->notify_pending);311 (void)ASMAtomicIncS32(&cvar->notify_pending); 312 312 notified->cv[index].times = (broadcast) ? -1 : 1; 313 313 notified->cv[index].cv = cvar; … … 338 338 PR_IMPLEMENT(void) PR_DestroyCondVar(PRCondVar *cvar) 339 339 { 340 if (0 > ASMAtomicDec U32(&cvar->notify_pending))340 if (0 > ASMAtomicDecS32(&cvar->notify_pending)) 341 341 { 342 342 PRIntn rv = pthread_cond_destroy(&cvar->cv); Assert(0 == rv);
Note:
See TracChangeset
for help on using the changeset viewer.