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.429 by root, Fri Dec 7 14:21:09 2012 UTC vs.
Revision 1.432 by root, Wed May 8 00:44:44 2013 UTC

279 279
280#if CORO_JIT 280#if CORO_JIT
281 /* APPLE doesn't have mmap though */ 281 /* APPLE doesn't have mmap though */
282 #define CORO_JIT_UNIXY (__linux || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __solaris || __APPLE__) 282 #define CORO_JIT_UNIXY (__linux || __FreeBSD__ || __OpenBSD__ || __NetBSD__ || __solaris || __APPLE__)
283 #ifndef CORO_JIT_TYPE 283 #ifndef CORO_JIT_TYPE
284 #if __x86_64 && CORO_JIT_UNIXY 284 #if ECB_AMD64 && CORO_JIT_UNIXY
285 #define CORO_JIT_TYPE "amd64-unix" 285 #define CORO_JIT_TYPE "amd64-unix"
286 #elif __i386 && CORO_JIT_UNIXY 286 #elif __i386 && CORO_JIT_UNIXY
287 #define CORO_JIT_TYPE "x86-unix" 287 #define CORO_JIT_TYPE "x86-unix"
288 #endif 288 #endif
289 #endif 289 #endif
2095{ 2095{
2096 AV *od = coro->on_destroy; 2096 AV *od = coro->on_destroy;
2097 2097
2098 if (!od) 2098 if (!od)
2099 return; 2099 return;
2100
2101 coro->on_destroy = 0;
2102 sv_2mortal ((SV *)od);
2100 2103
2101 while (AvFILLp (od) >= 0) 2104 while (AvFILLp (od) >= 0)
2102 { 2105 {
2103 SV *cb = sv_2mortal (av_pop (od)); 2106 SV *cb = sv_2mortal (av_pop (od));
2104 2107
3471transfer (...) 3474transfer (...)
3472 PROTOTYPE: $$ 3475 PROTOTYPE: $$
3473 CODE: 3476 CODE:
3474 CORO_EXECUTE_SLF_XS (slf_init_transfer); 3477 CORO_EXECUTE_SLF_XS (slf_init_transfer);
3475 3478
3476void
3477_exit (int code)
3478 PROTOTYPE: $
3479 CODE:
3480 _exit (code);
3481
3482SV * 3479SV *
3483clone (Coro::State coro) 3480clone (Coro::State coro)
3484 CODE: 3481 CODE:
3485{ 3482{
3486#if CORO_CLONE 3483#if CORO_CLONE
4237 { 4234 {
4238 PL_ppaddr [OP_SSELECT] = coro_old_pp_sselect; 4235 PL_ppaddr [OP_SSELECT] = coro_old_pp_sselect;
4239 coro_old_pp_sselect = 0; 4236 coro_old_pp_sselect = 0;
4240 } 4237 }
4241 4238
4239MODULE = Coro::State PACKAGE = Coro::Util
4240
4241void
4242_exit (int code)
4243 CODE:
4244 _exit (code);
4245
4246NV
4247time ()
4248 CODE:
4249 RETVAL = nvtime (aTHX);
4250 OUTPUT:
4251 RETVAL
4252
4253NV
4254gettimeofday ()
4255 PPCODE:
4256{
4257 UV tv [2];
4258 u2time (aTHX_ tv);
4259 EXTEND (SP, 2);
4260 PUSHs (sv_2mortal (newSVuv (tv [0])));
4261 PUSHs (sv_2mortal (newSVuv (tv [1])));
4262}
4263

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines