Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • benchmark/ctxswitch/cfa_gen.cfa

    r2316525 rb4107c8  
    33typedef struct {
    44        void * next;
    5 } C;
     5} GreatSuspender;
    66
    7 void comain( C * c ) {
    8         if ( __builtin_expect(c->next != 0, 1) ) goto *(c->next);
    9         c->next = &&s1;
     7void comain( GreatSuspender * this ) {
     8        if ( __builtin_expect(this->next != 0, 1) ) goto *(this->next);
     9        this->next = &&s1;
    1010        for () {
    1111                return;
     
    1616int main( int argc, char * argv[] ) {
    1717        BENCH_START()
    18         C c = { 0 };
     18        GreatSuspender s = { 0 };
    1919        BENCH(
    20                 for ( times ) {
    21                         comain( &c );
     20                for ( i; times ) {
     21                        comain( &s );
    2222                },
    2323                result
Note: See TracChangeset for help on using the changeset viewer.