Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • libcfa/src/concurrency/coroutine.hfa

    r8fc9a5f rbe73f30  
    6363void prime(T & cor);
    6464
    65 static inline struct $coroutine * active_coroutine() { return TL_GET( this_thread )->curr_cor; }
     65static inline struct $coroutine * active_coroutine() { return active_thread()->curr_cor; }
    6666
    6767//-----------------------------------------------------------------------------
     
    8787
    8888        // set new coroutine that task is executing
    89         TL_GET( this_thread )->curr_cor = dst;
     89        active_thread()->curr_cor = dst;
    9090
    9191        // context switch to specified coroutine
     
    112112                // will also migrate which means this value will
    113113                // stay in syn with the TLS
    114                 $coroutine * src = TL_GET( this_thread )->curr_cor;
     114                $coroutine * src = active_coroutine();
    115115
    116116                assertf( src->last != 0,
     
    138138        // will also migrate which means this value will
    139139        // stay in syn with the TLS
    140         $coroutine * src = TL_GET( this_thread )->curr_cor;
     140        $coroutine * src = active_coroutine();
    141141        $coroutine * dst = get_coroutine(cor);
    142142
    143143        if( unlikely(dst->context.SP == 0p) ) {
    144                 TL_GET( this_thread )->curr_cor = dst;
     144                active_thread()->curr_cor = dst;
    145145                __stack_prepare(&dst->stack, 65000);
    146146                __cfactx_start(main, dst, cor, __cfactx_invoke_coroutine);
    147                 TL_GET( this_thread )->curr_cor = src;
     147                active_thread()->curr_cor = src;
    148148        }
    149149
     
    175175        // will also migrate which means this value will
    176176        // stay in syn with the TLS
    177         $coroutine * src = TL_GET( this_thread )->curr_cor;
     177        $coroutine * src = active_coroutine();
    178178
    179179        // not resuming self ?
Note: See TracChangeset for help on using the changeset viewer.