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.254 by root, Fri Nov 7 20:27:47 2008 UTC vs.
Revision 1.255 by root, Sat Nov 8 04:52:01 2008 UTC

155/* helper storage struct for Coro::AIO */ 155/* helper storage struct for Coro::AIO */
156struct io_state 156struct io_state
157{ 157{
158 AV *res; 158 AV *res;
159 int errorno; 159 int errorno;
160 I32 laststype; 160 I32 laststype; /* U16 in 5.10.0 */
161 int laststatval; 161 int laststatval;
162 Stat_t statcache; 162 Stat_t statcache;
163}; 163};
164 164
165static double (*nvtime)(); /* so why doesn't it take void? */ 165static double (*nvtime)(); /* so why doesn't it take void? */
1652 else 1652 else
1653 coro->slot->runops = RUNOPS_DEFAULT; 1653 coro->slot->runops = RUNOPS_DEFAULT;
1654 } 1654 }
1655} 1655}
1656 1656
1657#if 0
1657static int 1658static int
1658coro_gensub_free (pTHX_ SV *sv, MAGIC *mg) 1659coro_gensub_free (pTHX_ SV *sv, MAGIC *mg)
1659{ 1660{
1660 AV *padlist; 1661 AV *padlist;
1661 AV *av = (AV *)mg->mg_obj; 1662 AV *av = (AV *)mg->mg_obj;
1667 1668
1668static MGVTBL coro_gensub_vtbl = { 1669static MGVTBL coro_gensub_vtbl = {
1669 0, 0, 0, 0, 1670 0, 0, 0, 0,
1670 coro_gensub_free 1671 coro_gensub_free
1671}; 1672};
1673#endif
1672 1674
1673/*****************************************************************************/ 1675/*****************************************************************************/
1674/* PerlIO::cede */ 1676/* PerlIO::cede */
1675 1677
1676typedef struct 1678typedef struct
2012 CODE: 2014 CODE:
2013 RETVAL = (coro->cctx ? coro->cctx->flags : 0) & CC_TRACE_ALL; 2015 RETVAL = (coro->cctx ? coro->cctx->flags : 0) & CC_TRACE_ALL;
2014 OUTPUT: 2016 OUTPUT:
2015 RETVAL 2017 RETVAL
2016 2018
2017IV 2019UV
2018rss (Coro::State coro) 2020rss (Coro::State coro)
2019 PROTOTYPE: $ 2021 PROTOTYPE: $
2020 ALIAS: 2022 ALIAS:
2021 usecount = 1 2023 usecount = 1
2022 CODE: 2024 CODE:
2204 sv_setsv (cb, &PL_sv_undef); 2206 sv_setsv (cb, &PL_sv_undef);
2205 2207
2206 SvREFCNT_dec ((SV *)PL_defoutgv); PL_defoutgv = (GV *)coro->saved_deffh; 2208 SvREFCNT_dec ((SV *)PL_defoutgv); PL_defoutgv = (GV *)coro->saved_deffh;
2207 coro->saved_deffh = 0; 2209 coro->saved_deffh = 0;
2208 2210
2209 if (coro_rss (aTHX_ coro) > SvIV (sv_pool_rss) 2211 if (coro_rss (aTHX_ coro) > SvUV (sv_pool_rss)
2210 || av_len (av_async_pool) + 1 >= SvIV (sv_pool_size)) 2212 || av_len (av_async_pool) + 1 >= SvIV (sv_pool_size))
2211 { 2213 {
2212 SV *old = PL_diehook; 2214 SV *old = PL_diehook;
2213 PL_diehook = 0; 2215 PL_diehook = 0;
2214 SvREFCNT_dec (old); 2216 SvREFCNT_dec (old);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines