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.25 by root, Wed Aug 15 03:24:07 2001 UTC vs.
Revision 1.26 by root, Fri Aug 17 01:45:39 2001 UTC

873 if (!padlist_cache) 873 if (!padlist_cache)
874 padlist_cache = newHV (); 874 padlist_cache = newHV ();
875 875
876 main_mainstack = PL_mainstack; 876 main_mainstack = PL_mainstack;
877 877
878 {
879 SV *sv = perl_get_sv("Coro::API", 1);
880
881 coroapi.ver = CORO_API_VERSION - 1; 878 coroapi.ver = CORO_API_VERSION;
882 coroapi.transfer = api_transfer; 879 coroapi.transfer = api_transfer;
883 coroapi.schedule = api_schedule;
884 coroapi.ready = api_ready;
885 coroapi.nready = &coro_nready;
886
887 GCoroAPI = &coroapi;
888 sv_setiv(sv, (IV)&coroapi);
889 SvREADONLY_on(sv);
890 }
891} 880}
892 881
893Coro::State 882Coro::State
894_newprocess(args) 883_newprocess(args)
895 SV * args 884 SV * args
1013 coro_current = gv_fetchpv ("Coro::current", TRUE, SVt_PV); 1002 coro_current = gv_fetchpv ("Coro::current", TRUE, SVt_PV);
1014 coro_idle = gv_fetchpv ("Coro::idle" , TRUE, SVt_PV); 1003 coro_idle = gv_fetchpv ("Coro::idle" , TRUE, SVt_PV);
1015 1004
1016 for (i = PRIO_MAX - PRIO_MIN + 1; i--; ) 1005 for (i = PRIO_MAX - PRIO_MIN + 1; i--; )
1017 coro_ready[i] = newAV (); 1006 coro_ready[i] = newAV ();
1007
1008 {
1009 SV *sv = perl_get_sv("Coro::API", 1);
1010
1011 coroapi.schedule = api_schedule;
1012 coroapi.ready = api_ready;
1013 coroapi.nready = &coro_nready;
1014 coroapi.current = coro_current;
1015
1016 GCoroAPI = &coroapi;
1017 sv_setiv(sv, (IV)&coroapi);
1018 SvREADONLY_on(sv);
1019 }
1018} 1020}
1019 1021
1020void 1022void
1021ready(self) 1023ready(self)
1022 SV * self 1024 SV * self

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines