ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/Coro/State.xs
(Generate patch)

Comparing Coro/Coro/State.xs (file contents):
Revision 1.218 by root, Mon Dec 3 00:41:45 2007 UTC vs.
Revision 1.219 by root, Tue Dec 4 19:33:45 2007 UTC

1394 SAVETMPS; 1394 SAVETMPS;
1395 1395
1396 PUSHMARK (SP); 1396 PUSHMARK (SP);
1397 PUTBACK; 1397 PUTBACK;
1398 call_sv (get_sv ("Coro::idle", FALSE), G_DISCARD); 1398 call_sv (get_sv ("Coro::idle", FALSE), G_DISCARD);
1399 SPAGAIN;
1399 1400
1400 FREETMPS; 1401 FREETMPS;
1401 LEAVE; 1402 LEAVE;
1402 continue; 1403 continue;
1403 } 1404 }
1603 Coro::cede_notself = 4 1604 Coro::cede_notself = 4
1604 CODE: 1605 CODE:
1605{ 1606{
1606 struct transfer_args ta; 1607 struct transfer_args ta;
1607 1608
1609 PUTBACK;
1608 switch (ix) 1610 switch (ix)
1609 { 1611 {
1610 case 0: 1612 case 0:
1611 ta.prev = (struct coro *)INT2PTR (coro_cctx *, SvIV (ST (0))); 1613 ta.prev = (struct coro *)INT2PTR (coro_cctx *, SvIV (ST (0)));
1612 ta.next = 0; 1614 ta.next = 0;
1631 if (!prepare_cede_notself (aTHX_ &ta)) 1633 if (!prepare_cede_notself (aTHX_ &ta))
1632 XSRETURN_EMPTY; 1634 XSRETURN_EMPTY;
1633 1635
1634 break; 1636 break;
1635 } 1637 }
1638 SPAGAIN;
1636 1639
1637 BARRIER; 1640 BARRIER;
1638 PUTBACK; 1641 PUTBACK;
1639 TRANSFER (ta); 1642 TRANSFER (ta);
1640 SPAGAIN; /* might be the sp of a different coroutine now */ 1643 SPAGAIN; /* might be the sp of a different coroutine now */
1698 { 1701 {
1699 struct coro temp; 1702 struct coro temp;
1700 1703
1701 if (!(coro->flags & CF_RUNNING)) 1704 if (!(coro->flags & CF_RUNNING))
1702 { 1705 {
1706 PUTBACK;
1703 save_perl (aTHX_ &temp); 1707 save_perl (aTHX_ &temp);
1704 load_perl (aTHX_ coro); 1708 load_perl (aTHX_ coro);
1705 } 1709 }
1706 1710
1707 { 1711 {
1726 1730
1727 if (!(coro->flags & CF_RUNNING)) 1731 if (!(coro->flags & CF_RUNNING))
1728 { 1732 {
1729 save_perl (aTHX_ coro); 1733 save_perl (aTHX_ coro);
1730 load_perl (aTHX_ &temp); 1734 load_perl (aTHX_ &temp);
1735 SPAGAIN;
1731 } 1736 }
1732 } 1737 }
1733} 1738}
1734 1739
1735SV * 1740SV *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines