- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcfa/src/concurrency/coroutine.cfa
r09f357ec re3fea42 10 10 // Created On : Mon Nov 28 12:27:26 2016 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Dec 5 14:37:29 201913 // Update Count : 1 512 // Last Modified On : Tue Feb 4 12:29:25 2020 13 // Update Count : 16 14 14 // 15 15 … … 89 89 } 90 90 91 void ?{}( coroutine_desc & this, const char * name, void * storage, size_t storageSize ) with( this ) {91 void ?{}( coroutine_desc & this, const char name[], void * storage, size_t storageSize ) with( this ) { 92 92 (this.context){0p, 0p}; 93 93 (this.stack){storage, storageSize}; … … 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.