- Timestamp:
- May 18, 2020, 4:40:10 PM (5 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:
- 7c38d53
- Parents:
- 893da07
- Location:
- libcfa/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified libcfa/src/Makefile.am ¶
r893da07 r314dab6 11 11 ## Created On : Sun May 31 08:54:01 2015 12 12 ## Last Modified By : Peter A. Buhr 13 ## Last Modified On : Mon Mar 16 18:07:59202014 ## Update Count : 24 213 ## Last Modified On : Sun May 17 21:10:26 2020 14 ## Update Count : 243 15 15 ############################################################################### 16 16 … … 42 42 bits/align.hfa bits/containers.hfa bits/defs.hfa bits/debug.hfa bits/locks.hfa containers/list.hfa 43 43 headers = fstream.hfa iostream.hfa iterator.hfa limits.hfa rational.hfa time.hfa stdlib.hfa common.hfa \ 44 containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/ vector.hfa44 containers/maybe.hfa containers/pair.hfa containers/result.hfa containers/stackLockFree.hfa containers/vector.hfa 45 45 46 46 libsrc = startup.cfa interpose.cfa bits/debug.cfa assert.cfa exception.c virtual.c heap.cfa ${headers:.hfa=.cfa} -
TabularUnified libcfa/src/containers/stackLockFree.hfa ¶
r893da07 r314dab6 9 9 // Created On : Wed May 13 20:58:58 2020 10 10 // Last Modified By : Peter A. Buhr 11 // Last Modified On : Sun May 17 20:53:37202012 // Update Count : 4811 // Last Modified On : Mon May 18 13:30:08 2020 12 // Update Count : 55 13 13 // 14 14 … … 23 23 uintptr_t count; // count each push 24 24 }; 25 #if _ GLIBCXX_USE_INT128 == 125 #if __SIZEOF_INT128__ == 16 26 26 __int128 // gcc, 128-bit integer 27 27 #else 28 28 uint64_t // 64-bit integer 29 #endif // _ GLIBCXX_USE_INT128 == 129 #endif // __SIZEOF_INT128__ == 16 30 30 atom; 31 31 }; // Link … … 44 44 for () { // busy wait 45 45 *getNext( &n ) = stack; // atomic assignment unnecessary, or use CAA 46 46 if ( __atomic_compare_exchange_n( &stack.atom, &getNext( &n )->atom, (Link(T))@{ {&n, getNext( &n )->count + 1} }.atom, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST ) ) break; // attempt to update top node 47 47 } // for 48 48 } // push
Note: See TracChangeset
for help on using the changeset viewer.