Ignore:
Timestamp:
Mar 15, 2017, 3:59:09 PM (7 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, resolv-new, with_gc
Children:
0e7b95c
Parents:
0ea1b65
Message:

Removed unnecessary getter for this_processor

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/thread.c

    r0ea1b65 r89a3df5  
    2828}
    2929
    30 extern processor * get_this_processor();
     30extern thread_local processor * this_processor;
    3131
    3232//-----------------------------------------------------------------------------
     
    7777        thread*  thrd_h = get_thread   (this);
    7878        thrd_c->last = this_coroutine();
    79         get_this_processor()->current_coroutine = thrd_c;
     79        this_processor->current_coroutine = thrd_c;
    8080
    8181        LIB_DEBUG_PRINTF("Thread start : %p (t %p, c %p)\n", this, thrd_c, thrd_h);
     
    9494
    9595void yield( void ) {
    96         ScheduleInternal( get_this_processor()->current_thread );
     96        ScheduleInternal( this_processor->current_thread );
    9797}
    9898
     
    107107        // set new coroutine that the processor is executing
    108108        // and context switch to it
    109         get_this_processor()->current_coroutine = dst; 
     109        this_processor->current_coroutine = dst;
    110110        CtxSwitch( src->stack.context, dst->stack.context );
    111         get_this_processor()->current_coroutine = src; 
     111        this_processor->current_coroutine = src;
    112112
    113113        // set state of new coroutine to active
Note: See TracChangeset for help on using the changeset viewer.