- File:
-
- 1 edited
-
libcfa/src/concurrency/coroutine.cfa (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
r09f357ec rc8c0c7c5 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Dec 5 14:37:29201913 // Update Count : 1 512 // Last Modified On : Sat Nov 30 09:59:36 2019 13 // Update Count : 14 14 14 // 15 15 … … 187 187 // is not inline (We can't inline Cforall in C) 188 188 extern "C" { 189 void __leave_coroutine( struct coroutine_desc * src ) { 189 void __suspend_internal(void) { 190 suspend(); 191 } 192 193 void __leave_coroutine( coroutine_desc * src ) { 190 194 coroutine_desc * starter = src->cancellation != 0 ? src->last : src->starter; 191 195 … … 203 207 CoroutineCtxSwitch( src, starter ); 204 208 } 205 206 struct coroutine_desc * __finish_coroutine(void) {207 struct coroutine_desc * cor = kernelTLS.this_thread->curr_cor;208 209 if(cor->state == Primed) {210 suspend();211 }212 213 cor->state = Active;214 215 return cor;216 }217 209 } 218 210
Note:
See TracChangeset
for help on using the changeset viewer.