Ignore:
Timestamp:
Mar 8, 2018, 9:23:10 AM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, 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, resolv-new, with_gc
Children:
5600747
Parents:
caa649b
Message:

Update the processor test

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tests/preempt_longrun/processor.c

    rcaa649b re5d4e5c  
    1212}
    1313
    14 thread worker_t {};
    15 
    16 void main(worker_t & this) {}
    17 
    18 extern processor *   mainProcessor;
    19 extern thread_desc * mainThread;
    20 
    2114int main(int argc, char* argv[]) {
    22         for(int i = 0; i < N; i++) {
    23                 assert(this_processor == mainProcessor);
    24                 assert(this_thread == mainThread);
    25                 processor p;
     15        processor * p[15];
     16        for ( int pi = 0; pi < 15; pi++ ) {
     17                p[pi] = new();
     18        }
     19        for ( int i = 0; i < N; i++) {
     20                int pi = i % 15;
     21                for ( volatile int j = 0; j < 10000; j++ );
     22                delete( p[pi] );
     23                p[pi] = new();
    2624        }
    2725}
Note: See TracChangeset for help on using the changeset viewer.