Changes in / [7453a68:aaa4f93]


Ignore:
Location:
src
Files:
4 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • src/libcfa/concurrency/coroutine

    r7453a68 raaa4f93  
    103103                // set last resumer
    104104                dst->last = src;
    105                 dst->starter = dst->starter ? dst->starter : src;
    106105        } // if
    107106
  • src/libcfa/concurrency/coroutine.c

    r7453a68 raaa4f93  
    6565        this.errno_ = 0;
    6666        this.state = Start;
    67         this.starter = NULL;
     67        this.starter = this_coroutine;
    6868        this.last = NULL;
    6969}
     
    176176
    177177                assertf( src->starter != 0,
    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.",
     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",
    180180                        src->name, src );
    181181                assertf( src->starter->state != Halted,
    182                         "Attempt by coroutine \"%.256s\" (%p) to suspend/leave back to terminated coroutine \"%.256s\" (%p).\n"
     182                        "Attempt by coroutine \"%.256s\" (%p) to suspend back to terminated coroutine \"%.256s\" (%p).\n"
    183183                        "Possible cause is terminated coroutine's main routine has already returned.",
    184184                        src->name, src, src->starter->name, src->starter );
  • src/libcfa/concurrency/kernel.c

    r7453a68 raaa4f93  
    115115void ?{}(processorCtx_t & this, processor * proc) {
    116116        (this.__cor){ "Processor" };
    117         this.__cor.starter = NULL;
     117        this.__cor.starter = &mainThread->self_cor;
    118118        this.proc = proc;
    119119        proc->runner = &this;
Note: See TracChangeset for help on using the changeset viewer.