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.470 by root, Fri Jul 14 13:14:32 2017 UTC vs.
Revision 1.472 by root, Thu Aug 31 16:24:19 2017 UTC

114# ifdef SYS_clock_gettime 114# ifdef SYS_clock_gettime
115# define coro_clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts)) 115# define coro_clock_gettime(id, ts) syscall (SYS_clock_gettime, (id), (ts))
116# define CORO_CLOCK_MONOTONIC 1 116# define CORO_CLOCK_MONOTONIC 1
117# define CORO_CLOCK_THREAD_CPUTIME_ID 3 117# define CORO_CLOCK_THREAD_CPUTIME_ID 3
118# endif 118# endif
119#endif
120
121/* one off bugfix for perl 5.22 */
122#if PERL_VERSION_ATLEAST(5,22,0) && !PERL_VERSION_ATLEAST(5,24,0)
123# undef PadlistNAMES
124# define PadlistNAMES(pl) *((PADNAMELIST **)PadlistARRAY (pl))
119#endif 125#endif
120 126
121#if PERL_VERSION_ATLEAST(5,24,0) 127#if PERL_VERSION_ATLEAST(5,24,0)
122# define SUB_ARGARRAY PL_curpad[0] 128# define SUB_ARGARRAY PL_curpad[0]
123#else 129#else
2366safe_cancel (pTHX_ struct coro *coro, SV **arg, int items) 2372safe_cancel (pTHX_ struct coro *coro, SV **arg, int items)
2367{ 2373{
2368 if (coro->cctx) 2374 if (coro->cctx)
2369 croak ("coro inside C callback, unable to cancel at this time, caught"); 2375 croak ("coro inside C callback, unable to cancel at this time, caught");
2370 2376
2371 if (coro->flags & CF_NEW) 2377 if (coro->flags & (CF_NEW | CF_ZOMBIE))
2372 { 2378 {
2373 coro_set_status (aTHX_ coro, arg, items); 2379 coro_set_status (aTHX_ coro, arg, items);
2374 coro_state_destroy (aTHX_ coro); 2380 coro_state_destroy (aTHX_ coro);
2375 } 2381 }
2376 else 2382 else
4073 coroapi.enterleave_hook = api_enterleave_hook; 4079 coroapi.enterleave_hook = api_enterleave_hook;
4074 coroapi.enterleave_unhook = api_enterleave_unhook; 4080 coroapi.enterleave_unhook = api_enterleave_unhook;
4075 coroapi.enterleave_scope_hook = api_enterleave_scope_hook; 4081 coroapi.enterleave_scope_hook = api_enterleave_scope_hook;
4076 4082
4077 /*GCoroAPI = &coroapi;*/ 4083 /*GCoroAPI = &coroapi;*/
4078 sv_setiv (sv, (IV)&coroapi); 4084 sv_setiv (sv, PTR2IV (&coroapi));
4079 SvREADONLY_on (sv); 4085 SvREADONLY_on (sv);
4080 } 4086 }
4081} 4087}
4082 4088
4083SV * 4089SV *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines