- File:
-
- 1 edited
-
src/libcfa/concurrency/coroutine.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/coroutine.c
r39fea2f red235b6 65 65 this.errno_ = 0; 66 66 this.state = Start; 67 this.starter = this_coroutine;67 this.starter = NULL; 68 68 this.last = NULL; 69 69 } … … 171 171 suspend(); 172 172 } 173 174 void __leave_coroutine(void) {175 coroutine_desc * src = this_coroutine; // optimization176 177 assertf( src->starter != 0,178 "Attempt to suspend coroutine \"%.256s\" (%p) that does not have a starter.\n"179 "Possible cause is a resume of a coroutine already destroyed or not yet constructed",180 src->name, src );181 assertf( src->starter->state != Halted,182 "Attempt by coroutine \"%.256s\" (%p) to suspend back to terminated coroutine \"%.256s\" (%p).\n"183 "Possible cause is terminated coroutine's main routine has already returned.",184 src->name, src, src->starter->name, src->starter );185 186 CoroutineCtxSwitch( src, src->starter );187 }188 173 } 189 174
Note:
See TracChangeset
for help on using the changeset viewer.