Changeset 92538ab for libcfa/src/concurrency/kernel/fwd.hfa
- Timestamp:
- Apr 10, 2022, 2:53:18 PM (4 years ago)
- Branches:
- ADT, ast-experimental, enum, master, pthread-emulation, qualifiedEnum
- Children:
- d8e2a09
- Parents:
- 4559b34 (diff), 6256891 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)links above to see all the changes relative to each parent. - File:
-
- 1 edited
-
libcfa/src/concurrency/kernel/fwd.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/fwd.hfa
r4559b34 r92538ab 248 248 // check if the future is available 249 249 bool available( future_t & this ) { 250 while( this.ptr == 2p ) Pause(); 250 251 return this.ptr == 1p; 251 252 } … … 347 348 struct oneshot * want = expected == 0p ? 1p : 2p; 348 349 if(__atomic_compare_exchange_n(&this.ptr, &expected, want, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) { 349 if( expected == 0p ) { /* paranoid */ verify( this.ptr == 1p);return 0p; }350 if( expected == 0p ) { return 0p; } 350 351 thread$ * ret = post( *expected, do_unpark ); 351 352 __atomic_store_n( &this.ptr, 1p, __ATOMIC_SEQ_CST);
Note:
See TracChangeset
for help on using the changeset viewer.