- File:
-
- 1 edited
-
libcfa/src/concurrency/kernel/fwd.hfa (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/kernel/fwd.hfa
r64bdacc rc9c1c1cb 248 248 // check if the future is available 249 249 bool available( future_t & this ) { 250 while( this.ptr == 2p ) Pause();251 250 return this.ptr == 1p; 252 251 } … … 348 347 struct oneshot * want = expected == 0p ? 1p : 2p; 349 348 if(__atomic_compare_exchange_n(&this.ptr, &expected, want, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) { 350 if( expected == 0p ) { return 0p; }349 if( expected == 0p ) { /* paranoid */ verify( this.ptr == 1p); return 0p; } 351 350 thread$ * ret = post( *expected, do_unpark ); 352 351 __atomic_store_n( &this.ptr, 1p, __ATOMIC_SEQ_CST);
Note:
See TracChangeset
for help on using the changeset viewer.