- File:
-
- 1 edited
-
src/libcfa/concurrency/threads.c (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/threads.c
rb58a5772 r80d9e49 44 44 } 45 45 46 void c orCxtSw(coroutine* src, coroutine* dst);46 void ctxSwitchDirect(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 CtxInvokeCoroutine(T* this);51 void invokeCoroutine(T* this); 52 52 53 53 forall(dtype T | is_coroutine(T)) 54 void CtxStart(T* this, void (*invoke)(T*));54 void startCoroutine(T* this, void (*invoke)(T*)); 55 55 } 56 56 … … 100 100 src->name, src, src->last->name, src->last ); 101 101 102 c orCxtSw( src, src->last );102 ctxSwitchDirect( src, src->last ); 103 103 } 104 104 … … 108 108 coroutine* dst = get_coroutine(cor); 109 109 110 if( dst->stack.base == NULL) {110 if( ((intptr_t)dst->stack.base) == 0 ) { 111 111 create_stack(&dst->stack, dst->stack.size); 112 CtxStart(cor, CtxInvokeCoroutine);112 startCoroutine(cor, invokeCoroutine); 113 113 } 114 114 … … 120 120 dst->last = src; // set last resumer 121 121 } // if 122 c orCxtSw( src, dst ); // always done for performance testing122 ctxSwitchDirect( src, dst ); // always done for performance testing 123 123 } 124 124 … … 132 132 } 133 133 134 void c orCxtSw(coroutine* src, coroutine* dst) {134 void ctxSwitchDirect(coroutine* src, coroutine* dst) { 135 135 // THREAD_GETMEM( This )->disableInterrupts(); 136 136
Note:
See TracChangeset
for help on using the changeset viewer.