Changeset 6f36dde
- Timestamp:
 - Jan 20, 2021, 8:40:37 PM (5 years ago)
 - Branches:
 - ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast-unique-expr, pthread-emulation, qualifiedEnum
 - Children:
 - 467c8b7
 - Parents:
 - f706697
 - File:
 - 
      
- 1 edited
 
- 
          
  libcfa/src/containers/stackLockFree.hfa (modified) (3 diffs)
 
 
Legend:
- Unmodified
 - Added
 - Removed
 
- 
      
libcfa/src/containers/stackLockFree.hfa
rf706697 r6f36dde 9 9 // Created On : Wed May 13 20:58:58 2020 10 10 // Last Modified By : Peter A. Buhr 11 // Last Modified On : Sun Jun 14 13:25:09 202012 // Update Count : 6 411 // Last Modified On : Wed Jan 20 20:40:03 2021 12 // Update Count : 67 13 13 // 14 14 … … 42 42 43 43 void push( StackLF(T) & this, T & n ) with(this) { 44 *( &n )`next = stack; // atomic assignment unnecessary, or use CAA44 *( &n )`next = stack; // atomic assignment unnecessary, or use CAA 45 45 for () { // busy wait 46 46 if ( __atomic_compare_exchange_n( &stack.atom, &( &n )`next->atom, (Link(T))@{ {&n, ( &n )`next->count + 1} }.atom, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST ) ) break; // attempt to update top node … … 65 65 } 66 66 if( next == 0p ) return false; 67 link = ( next)`next;67 link = ( next )`next; 68 68 } 69 69 }  
  Note:
 See   TracChangeset
 for help on using the changeset viewer.