Ignore:
Timestamp:
Jun 7, 2018, 6:12:11 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:
6eb131c, 7b28e4a
Parents:
174845e (diff), 85b1deb (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.
Message:

Merge branch 'master' of plg.uwaterloo.ca:software/cfa/cfa-cc

Location:
src/tests/preempt_longrun
Files:
2 edited

Legend:

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

    r174845e rbeefc34c  
    1515
    1616monitor mon_t {};
     17void foo( mon_t & mutex this ) {}
    1718
    1819mon_t mon;
    19 
    20 void foo( mon_t & mutex this ) {}
    21 
    2220thread worker_t {};
    23 
    2421void main( worker_t & this ) {
    2522        for( unsigned long i = 0; i < N; i++ ) {
     
    2825}
    2926
    30 extern "C" {
    31 static worker_t * workers;
    32 }
    33 
    3427int main(int argc, char * argv[] ) {
    3528        processor p;
    3629        {
    3730                worker_t w[7];
    38                 workers = w;
    3931        }
    4032}
  • src/tests/preempt_longrun/processor.c

    r174845e rbeefc34c  
    22#include <thread>
    33#include <time>
     4
     5#include <unistd.h>
    46
    57#ifndef PREEMPTION_RATE
     
    1113}
    1214
    13 static const unsigned long N = 5_000ul;
     15static const unsigned long N = 50_000ul;
    1416
    1517int main(int argc, char* argv[]) {
    1618        processor * p[15];
     19        write(STDOUT_FILENO, "Preparing\n", sizeof("Preparing\n"));
    1720        for ( int pi = 0; pi < 15; pi++ ) {
    1821                p[pi] = new();
    1922        }
     23        write(STDOUT_FILENO, "Starting\n", sizeof("Starting\n"));
    2024        for ( int i = 0; i < N; i++) {
    2125                int pi = i % 15;
     
    2327                p[pi] = new();
    2428        }
     29        write(STDOUT_FILENO, "Stopping\n", sizeof("Stopping\n"));
    2530        for ( int pi = 0; pi < 15; pi++ ) {
    2631                delete( p[pi] );
    2732        }
     33        write(STDOUT_FILENO, "Done\n", sizeof("Done\n"));
    2834}
Note: See TracChangeset for help on using the changeset viewer.