Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/readyQ/transfer.cfa

    r65c9208 radfd125  
    1414
    1515bool exhaust = false;
    16 volatile bool estop = false;
    17 
    1816
    1917thread$ * the_main;
     
    3735static void waitgroup() {
    3836        Time start = timeHiRes();
    39         OUTER: for(i; nthreads) {
     37        for(i; nthreads) {
    4038                PRINT( sout | "Waiting for :" | i | "(" | threads[i]->idx | ")"; )
    4139                while( threads[i]->idx != lead_idx ) {
     
    4442                                print_stats_now( bench_cluster, CFA_STATS_READY_Q | CFA_STATS_IO );
    4543                                serr | "Programs has been blocked for more than 5 secs";
    46                                 estop = true;
    47                                 unpark( the_main );
    48                                 break OUTER;
     44                                exit(1);
    4945                        }
    5046                }
     
    6359static void lead(MyThread & this) {
    6460        this.idx = ++lead_idx;
    65         if(lead_idx > stop_count || estop) {
     61        if(lead_idx > stop_count) {
    6662                PRINT( sout | "Leader" | this.id | "done"; )
    6763                unpark( the_main );
     
    104100                        wait( this );
    105101                }
    106                 if(lead_idx > stop_count || estop) break;
     102                if(lead_idx > stop_count) break;
    107103        }
    108104}
     
    176172        sout | "Number of processors    : " | nprocs;
    177173        sout | "Number of threads       : " | nthreads;
    178         sout | "Total Operations(ops)   : " | lead_idx - 1;
     174        sout | "Total Operations(ops)   : " | stop_count;
    179175        sout | "Threads parking on wait : " | (exhaust ? "yes" : "no");
    180176        sout | "Rechecking              : " | rechecks;
    181         sout | "ns per transfer         : " | (end - start)`dms / lead_idx;
    182177
    183178
Note: See TracChangeset for help on using the changeset viewer.