Changeset fd365da for libcfa/src/concurrency/locks.hfa
- Timestamp:
- Jun 27, 2022, 1:51:00 PM (2 years ago)
- Branches:
- ADT, ast-experimental, master, pthread-emulation, qualifiedEnum
- Children:
- b01d459
- Parents:
- d28524a
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/locks.hfa
rd28524a rfd365da 533 533 #endif 534 534 lock( lock, node ); 535 while( held) Pause();536 held = true;535 while(__atomic_load_n(&held, __ATOMIC_SEQ_CST)) Pause(); 536 __atomic_store_n(&held, true, __ATOMIC_SEQ_CST); 537 537 unlock( lock, node ); 538 538 #ifdef __CFA_DEBUG__ … … 545 545 owner = 0p; 546 546 #endif 547 held = false;547 __atomic_store_n(&held, false, __ATOMIC_SEQ_CST); 548 548 } 549 549 … … 586 586 #endif 587 587 lock( lock ); 588 while( held) Pause();589 held = true;588 while(__atomic_load_n(&held, __ATOMIC_SEQ_CST)) Pause(); 589 __atomic_store_n(&held, true, __ATOMIC_RELEASE); 590 590 unlock( lock ); 591 591 #ifdef __CFA_DEBUG__ … … 598 598 owner = 0p; 599 599 #endif 600 held = false;600 __atomic_store_n(&held, false, __ATOMIC_RELEASE); 601 601 } 602 602
Note: See TracChangeset
for help on using the changeset viewer.