Changeset 64a7146 for libcfa/src/containers
- Timestamp:
- Jun 19, 2020, 3:49:43 PM (4 years ago)
- Branches:
- ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 68f36f4
- Parents:
- 04b5cef
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/containers/stackLockFree.hfa
r04b5cef r64a7146 32 32 33 33 forall( otype T | { Link(T) * getNext( T * ); } ) { 34 34 struct StackLF { 35 35 Link(T) stack; 36 36 }; // StackLF … … 56 56 } // for 57 57 } // pop 58 59 bool unsafe_remove( StackLF(T) & this, T * node ) with(this) { 60 Link(T) * link = &stack; 61 for() { 62 T * next = link->top; 63 if( next == node ) { 64 link->top = getNext( node )->top; 65 return true; 66 } 67 if( next == 0p ) return false; 68 link = getNext(next); 69 } 70 } 58 71 } // distribution 59 72 } // distribution
Note: See TracChangeset
for help on using the changeset viewer.