Changeset 8118303 for src/libcfa/concurrency/invoke.c
- Timestamp:
- Jan 17, 2017, 5:13:47 PM (7 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:
- c49bf54
- Parents:
- 7350ff97
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/invoke.c
r7350ff97 r8118303 20 20 void *this 21 21 ) { 22 LIB_DEBUG_PRINTF("Invoke : Received %p (main %p, get_c %p)\n", this, main, get_coroutine);22 LIB_DEBUG_PRINTF("Invoke Coroutine : Received %p (main %p, get_c %p)\n", this, main, get_coroutine); 23 23 24 24 struct coroutine* cor = get_coroutine( this ); … … 31 31 32 32 main( this ); 33 34 //Final suspend, should never return 35 __suspend_no_inline__F___1(); 36 assertf(false, "Resumed dead coroutine"); 37 } 38 39 void CtxInvokeThread( 40 void (*main)(void *), 41 struct thread_h *(*get_thread)(void *), 42 void *this 43 ) { 44 LIB_DEBUG_PRINTF("Invoke Thread : Received %p (main %p, get_t %p)\n", this, main, get_thread); 45 46 __suspend_no_inline__F___1(); 47 48 struct coroutine* cor = &get_thread( this )->c; 49 cor->state = Active; 50 51 LIB_DEBUG_PRINTF("Invoke Thread : invoking main %p (args %p)\n", main, this); 52 main( this ); 53 54 //Final suspend, should never return 55 __suspend_no_inline__F___1(); 56 assertf(false, "Resumed dead thread"); 33 57 } 34 58 … … 40 64 void (*invoke)(void *) 41 65 ) { 42 LIB_DEBUG_PRINTF("StartCoroutine : Passing in %p (main %p , get_c %p) to %p\n", this, main, get_coroutine, invoke);66 LIB_DEBUG_PRINTF("StartCoroutine : Passing in %p (main %p) to invoke (%p) from start (%p)\n", this, main, invoke, CtxStart); 43 67 44 68 struct coStack_t* stack = &get_coroutine( this )->stack;
Note: See TracChangeset
for help on using the changeset viewer.