Changeset f019069 for libcfa/src/concurrency/coroutine.cfa
- Timestamp:
- May 6, 2019, 10:09:02 AM (4 years ago)
- Branches:
- arm-eh, cleanup-dtors, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
- Children:
- 63364d8
- Parents:
- b9696a8
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
rb9696a8 rf019069 40 40 abort(); 41 41 } 42 43 extern void CtxRet( struct __stack_context_t * to ) asm ("CtxRet") __attribute__ ((__noreturn__)); 42 44 } 43 45 … … 203 205 CoroutineCtxSwitch( src, starter ); 204 206 } 207 208 __attribute__((noreturn)) void __suspend_callback( struct __stack_context_t *, fptr_t call ) { 209 call(); 210 211 coroutine_desc * src = TL_GET( this_thread )->curr_cor; 212 // set state of current coroutine to inactive 213 src->state = src->state == Halted ? Halted : Inactive; 214 215 TL_GET( this_thread )->curr_cor = src->last; 216 217 // context switch to specified coroutine 218 assert( src->last->context.SP ); 219 CtxRet( &src->last->context ); 220 221 abort(); 222 } 205 223 } 206 224
Note: See TracChangeset
for help on using the changeset viewer.