Changeset 61323a7 for src/tests/concurrent/preempt.c
- Timestamp:
- Apr 19, 2018, 10:36:18 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, with_gc
- Children:
- 2ae16219
- Parents:
- 6d2aa7ed (diff), 3265399 (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
Legend:
- Unmodified
- Added
- Removed
-
src/tests/concurrent/preempt.c
r6d2aa7ed r61323a7 11 11 } 12 12 13 #ifdef LONG_TEST 14 static const unsigned long N = 30_000ul; 15 #else 16 static const unsigned long N = 500ul; 17 #endif 18 13 19 static volatile int counter = 0; 14 20 … … 22 28 23 29 void main(worker_t & this) { 24 while(counter < 1000) {30 while(counter < N) { 25 31 if( (counter % 7) == this.value ) { 26 32 int next = __atomic_add_fetch_4(&counter, 1, __ATOMIC_SEQ_CST);
Note: See TracChangeset
for help on using the changeset viewer.