Changeset b462670 for src/libcfa
- Timestamp:
- Sep 20, 2017, 1:59: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:
- 8d722cc, 9bae71f
- Parents:
- 47b5b63
- Location:
- src/libcfa/concurrency
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/libcfa/concurrency/coroutine
r47b5b63 rb462670 103 103 // set last resumer 104 104 dst->last = src; 105 dst->starter = dst->starter ? dst->starter : src; 105 106 } // if 106 107 -
src/libcfa/concurrency/coroutine.c
r47b5b63 rb462670 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 } … … 176 176 177 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",178 "Attempt to suspend/leave coroutine \"%.256s\" (%p) that has never been resumed.\n" 179 "Possible cause is a suspend executed in a member called by a coroutine user rather than by the coroutine main.", 180 180 src->name, src ); 181 181 assertf( src->starter->state != Halted, 182 "Attempt by coroutine \"%.256s\" (%p) to suspend back to terminated coroutine \"%.256s\" (%p).\n"182 "Attempt by coroutine \"%.256s\" (%p) to suspend/leave back to terminated coroutine \"%.256s\" (%p).\n" 183 183 "Possible cause is terminated coroutine's main routine has already returned.", 184 184 src->name, src, src->starter->name, src->starter ); -
src/libcfa/concurrency/kernel.c
r47b5b63 rb462670 115 115 void ?{}(processorCtx_t & this, processor * proc) { 116 116 (this.__cor){ "Processor" }; 117 this.__cor.starter = &mainThread->cor;117 this.__cor.starter = NULL; 118 118 this.proc = proc; 119 119 proc->runner = &this;
Note: See TracChangeset
for help on using the changeset viewer.