Changeset b2fe1c9


Ignore:
Timestamp:
Apr 17, 2018, 12:00:57 PM (6 years ago)
Author:
Thierry Delisle <tdelisle@…>
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
Message:

Added long running test for preempt and reduce short test duration

Location:
src/tests
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/concurrent/preempt.c

    r70969f8 rb2fe1c9  
    99        return PREEMPTION_RATE;
    1010}
     11
     12#ifdef LONG_TEST
     13static const unsigned long N = 30_000ul;
     14#else
     15static const unsigned long N = 500ul;
     16#endif
    1117
    1218static volatile int counter = 0;
     
    2127
    2228void main(worker_t & this) {
    23         while(counter < 1000) {
     29        while(counter < N) {
    2430                if( (counter % 7) == this.value ) {
    2531                        int next = __atomic_add_fetch_4(&counter, 1, __ATOMIC_SEQ_CST);
Note: See TracChangeset for help on using the changeset viewer.