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.173 by root, Sun Sep 30 13:41:45 2007 UTC vs.
Revision 1.175 by root, Sun Sep 30 13:43:45 2007 UTC

1355 else 1355 else
1356 return 0; 1356 return 0;
1357} 1357}
1358 1358
1359static void 1359static void
1360api_trace (struct coro *coro, int flags) 1360api_trace (SV *coro_sv, int flags)
1361{ 1361{
1362 dTHX; 1362 dTHX;
1363 struct coro *coro = SvSTATE (coro_sv);
1363 1364
1364 if (flags & CC_TRACE) 1365 if (flags & CC_TRACE)
1365 { 1366 {
1366 if (!coro->cctx) 1367 if (!coro->cctx)
1367 coro->cctx = cctx_new (); 1368 coro->cctx = cctx_new ();
1612 RETVAL = boolSV (coro->flags & ix); 1613 RETVAL = boolSV (coro->flags & ix);
1613 OUTPUT: 1614 OUTPUT:
1614 RETVAL 1615 RETVAL
1615 1616
1616void 1617void
1617api_trace (Coro::State coro, int flags = CC_TRACE | CC_TRACE_SUB) 1618api_trace (SV *coro, int flags = CC_TRACE | CC_TRACE_SUB)
1618 1619
1619SV * 1620SV *
1620has_stack (Coro::State coro) 1621has_stack (Coro::State coro)
1621 PROTOTYPE: $ 1622 PROTOTYPE: $
1622 CODE: 1623 CODE:
1780 croak ("\3terminate\2\n"); 1781 croak ("\3terminate\2\n");
1781 1782
1782 av_clear (GvAV (PL_defgv)); 1783 av_clear (GvAV (PL_defgv));
1783 hv_store ((HV *)SvRV (coro_current), "desc", sizeof ("desc") - 1, 1784 hv_store ((HV *)SvRV (coro_current), "desc", sizeof ("desc") - 1,
1784 newSVpvn ("[async_pool idle]", sizeof ("[async_pool idle]") - 1), 0); 1785 newSVpvn ("[async_pool idle]", sizeof ("[async_pool idle]") - 1), 0);
1786
1785 coro->save = CORO_SAVE_DEF; 1787 coro->save = CORO_SAVE_DEF;
1786 coro->prio = 0; 1788 coro->prio = 0;
1787 1789
1788 if (coro->cctx && (coro->cctx->flags & CC_TRACE)) 1790 if (coro->cctx && (coro->cctx->flags & CC_TRACE))
1789 api_trace (coro, 0); 1791 api_trace (coro_current, 0);
1790 1792
1791 av_push (av_async_pool, newSVsv (coro_current)); 1793 av_push (av_async_pool, newSVsv (coro_current));
1792} 1794}
1793 1795
1794 1796

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines