Ignore:
Timestamp:
Dec 8, 2016, 5:50:39 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:
164d036
Parents:
fda7e90
Message:

Removed workarounds the void ptr error (now fixed).
Renamed a few functions for consistency

File:
1 edited

Legend:

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

    rfda7e90 rb58a5772  
    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.