Ignore:
Timestamp:
Dec 8, 2016, 5:53:25 PM (8 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:
6a16806
Parents:
9def87a (diff), b58a5772 (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

File:
1 edited

Legend:

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

    r9def87a r164d036  
    4444}
    4545
    46 void ctxSwitchDirect(coroutine* src, coroutine* dst);
     46void corCxtSw(coroutine* src, coroutine* dst);
    4747void create_stack( coStack_t* this, unsigned int storageSize ); // used by all constructors
    4848
    4949extern "C" {
    5050      forall(dtype T | is_coroutine(T))
    51       void invokeCoroutine(T* this);
     51      void CtxInvokeCoroutine(T* this);
    5252
    5353      forall(dtype T | is_coroutine(T))
    54       void startCoroutine(T* this, void (*invoke)(T*));
     54      void CtxStart(T* this, void (*invoke)(T*));
    5555}
    5656
     
    100100                src->name, src, src->last->name, src->last );
    101101
    102         ctxSwitchDirect( src, src->last );
     102        corCxtSw( src, src->last );
    103103}
    104104
     
    108108        coroutine* dst = get_coroutine(cor);
    109109
    110         if( ((intptr_t)dst->stack.base) == 0 ) {
     110        if( dst->stack.base == NULL ) {
    111111                create_stack(&dst->stack, dst->stack.size);
    112                 startCoroutine(cor, invokeCoroutine);
     112                CtxStart(cor, CtxInvokeCoroutine);
    113113        }
    114114
     
    120120                dst->last = src;                                        // set last resumer
    121121        } // if
    122         ctxSwitchDirect( src, dst );                            // always done for performance testing
     122        corCxtSw( src, dst );                           // always done for performance testing
    123123}
    124124
     
    132132}
    133133
    134 void ctxSwitchDirect(coroutine* src, coroutine* dst) {
     134void corCxtSw(coroutine* src, coroutine* dst) {
    135135        // THREAD_GETMEM( This )->disableInterrupts();
    136136
Note: See TracChangeset for help on using the changeset viewer.