… | |
… | |
56 | |
56 | |
57 | /* optionally saved, might be zero */ |
57 | /* optionally saved, might be zero */ |
58 | AV *defav; |
58 | AV *defav; |
59 | SV *defsv; |
59 | SV *defsv; |
60 | SV *errsv; |
60 | SV *errsv; |
61 | /* TODO: PL_pmop might be nice && effortless to save. */ |
|
|
62 | |
61 | |
63 | /* saved global state not related to stacks */ |
62 | /* saved global state not related to stacks */ |
64 | U8 dowarn; |
63 | U8 dowarn; |
65 | I32 in_eval; |
64 | I32 in_eval; |
66 | |
65 | |
… | |
… | |
749 | setup_coro (next); |
748 | setup_coro (next); |
750 | } |
749 | } |
751 | |
750 | |
752 | /* |
751 | /* |
753 | * xnext is now either prev or next, depending on wether |
752 | * xnext is now either prev or next, depending on wether |
754 | * we switched the c stack or not. that's why i use a global |
753 | * we switched the c stack or not. that's why I use a global |
755 | * variable, that should become thread-specific at one point. |
754 | * variable, that should become thread-specific at one point. |
756 | */ |
755 | */ |
757 | xnext->cursp = stacklevel; |
756 | xnext->cursp = stacklevel; |
758 | } |
757 | } |
759 | |
758 | |
… | |
… | |
868 | next = coro_deq (PRIO_MIN); |
867 | next = coro_deq (PRIO_MIN); |
869 | |
868 | |
870 | if (!next) |
869 | if (!next) |
871 | next = SvREFCNT_inc (SvRV (GvSV (coro_idle))); |
870 | next = SvREFCNT_inc (SvRV (GvSV (coro_idle))); |
872 | |
871 | |
|
|
872 | /* free this only after the transfer */ |
873 | coro_mortal = prev; |
873 | coro_mortal = prev; |
874 | SV_CORO (prev, "Coro::schedule"); |
874 | SV_CORO (prev, "Coro::schedule"); |
875 | |
875 | |
876 | SvRV (GvSV (coro_current)) = next; |
876 | SvRV (GvSV (coro_current)) = next; |
877 | |
877 | |