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.128 by root, Fri Dec 22 04:22:28 2006 UTC vs.
Revision 1.130 by root, Mon Dec 25 13:25:55 2006 UTC

969} 969}
970 970
971static int 971static int
972api_is_ready (SV *coro_sv) 972api_is_ready (SV *coro_sv)
973{ 973{
974 return !!SvSTATE (coro_sv)->flags & CF_READY; 974 return !!(SvSTATE (coro_sv)->flags & CF_READY);
975} 975}
976 976
977static void 977static void
978prepare_schedule (struct transfer_args *ta) 978prepare_schedule (struct transfer_args *ta)
979{ 979{
1228 RETVAL = coro->prio; 1228 RETVAL = coro->prio;
1229 1229
1230 if (items > 1) 1230 if (items > 1)
1231 { 1231 {
1232 if (ix) 1232 if (ix)
1233 newprio += coro->prio; 1233 newprio = coro->prio - newprio;
1234 1234
1235 if (newprio < PRIO_MIN) newprio = PRIO_MIN; 1235 if (newprio < PRIO_MIN) newprio = PRIO_MIN;
1236 if (newprio > PRIO_MAX) newprio = PRIO_MAX; 1236 if (newprio > PRIO_MAX) newprio = PRIO_MAX;
1237 1237
1238 coro->prio = newprio; 1238 coro->prio = newprio;
1239 } 1239 }
1240} 1240}
1241 OUTPUT:
1242 RETVAL
1241 1243
1242SV * 1244SV *
1243ready (SV *self) 1245ready (SV *self)
1244 PROTOTYPE: $ 1246 PROTOTYPE: $
1245 CODE: 1247 CODE:

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines