Changeset b58a5772 for src/libcfa/concurrency/threads.c
- Timestamp:
- Dec 8, 2016, 5:50:39 PM (8 years ago)
- 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
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/threads.c
rfda7e90 rb58a5772 44 44 } 45 45 46 void c txSwitchDirect(coroutine* src, coroutine* dst);46 void corCxtSw(coroutine* src, coroutine* dst); 47 47 void create_stack( coStack_t* this, unsigned int storageSize ); // used by all constructors 48 48 49 49 extern "C" { 50 50 forall(dtype T | is_coroutine(T)) 51 void invokeCoroutine(T* this);51 void CtxInvokeCoroutine(T* this); 52 52 53 53 forall(dtype T | is_coroutine(T)) 54 void startCoroutine(T* this, void (*invoke)(T*));54 void CtxStart(T* this, void (*invoke)(T*)); 55 55 } 56 56 … … 100 100 src->name, src, src->last->name, src->last ); 101 101 102 c txSwitchDirect( src, src->last );102 corCxtSw( src, src->last ); 103 103 } 104 104 … … 108 108 coroutine* dst = get_coroutine(cor); 109 109 110 if( ((intptr_t)dst->stack.base) == 0) {110 if( dst->stack.base == NULL ) { 111 111 create_stack(&dst->stack, dst->stack.size); 112 startCoroutine(cor, invokeCoroutine);112 CtxStart(cor, CtxInvokeCoroutine); 113 113 } 114 114 … … 120 120 dst->last = src; // set last resumer 121 121 } // if 122 c txSwitchDirect( src, dst ); // always done for performance testing122 corCxtSw( src, dst ); // always done for performance testing 123 123 } 124 124 … … 132 132 } 133 133 134 void c txSwitchDirect(coroutine* src, coroutine* dst) {134 void corCxtSw(coroutine* src, coroutine* dst) { 135 135 // THREAD_GETMEM( This )->disableInterrupts(); 136 136
Note: See TracChangeset
for help on using the changeset viewer.