Changeset b2fe1c9 for src/tests/concurrent/preempt.c
- Timestamp:
- Apr 17, 2018, 12:00:57 PM (7 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:
- 32cab5b
- Parents:
- 70969f8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tests/concurrent/preempt.c
r70969f8 rb2fe1c9 9 9 return PREEMPTION_RATE; 10 10 } 11 12 #ifdef LONG_TEST 13 static const unsigned long N = 30_000ul; 14 #else 15 static const unsigned long N = 500ul; 16 #endif 11 17 12 18 static volatile int counter = 0; … … 21 27 22 28 void main(worker_t & this) { 23 while(counter < 1000) {29 while(counter < N) { 24 30 if( (counter % 7) == this.value ) { 25 31 int next = __atomic_add_fetch_4(&counter, 1, __ATOMIC_SEQ_CST);
Note: See TracChangeset
for help on using the changeset viewer.