ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libev/ev.c
(Generate patch)

Comparing libev/ev.c (file contents):
Revision 1.444 by root, Fri Jun 1 22:01:13 2012 UTC vs.
Revision 1.445 by root, Sat Jun 2 11:15:29 2012 UTC

2762} 2762}
2763 2763
2764void noinline 2764void noinline
2765ev_invoke_pending (EV_P) 2765ev_invoke_pending (EV_P)
2766{ 2766{
2767 for (pendingpri = NUMPRI; pendingpri--; ) /* pendingpri is modified during the loop */ 2767 pendingpri = NUMPRI;
2768
2769 while (pendingpri) /* pendingpri possibly gets modified in the inner loop */
2770 {
2771 --pendingpri;
2772
2768 while (pendingcnt [pendingpri]) 2773 while (pendingcnt [pendingpri])
2769 { 2774 {
2770 ANPENDING *p = pendings [pendingpri] + --pendingcnt [pendingpri]; 2775 ANPENDING *p = pendings [pendingpri] + --pendingcnt [pendingpri];
2771 2776
2772 p->w->pending = 0; 2777 p->w->pending = 0;
2773 EV_CB_INVOKE (p->w, p->events); 2778 EV_CB_INVOKE (p->w, p->events);
2774 EV_FREQUENT_CHECK; 2779 EV_FREQUENT_CHECK;
2775 } 2780 }
2781 }
2776} 2782}
2777 2783
2778#if EV_IDLE_ENABLE 2784#if EV_IDLE_ENABLE
2779/* make idle watchers pending. this handles the "call-idle */ 2785/* make idle watchers pending. this handles the "call-idle */
2780/* only when higher priorities are idle" logic */ 2786/* only when higher priorities are idle" logic */
3177 && !(flags & (EVRUN_ONCE | EVRUN_NOWAIT)) 3183 && !(flags & (EVRUN_ONCE | EVRUN_NOWAIT))
3178 )); 3184 ));
3179 3185
3180 if (loop_done == EVBREAK_ONE) 3186 if (loop_done == EVBREAK_ONE)
3181 loop_done = EVBREAK_CANCEL; 3187 loop_done = EVBREAK_CANCEL;
3182
3183 /* pendingpri is normally -1 here, which is not a good */
3184 /* value when returning to an ev_invoke_pending */
3185 pendingpri = NUMPRI - 1;
3186 3188
3187#if EV_FEATURE_API 3189#if EV_FEATURE_API
3188 --loop_depth; 3190 --loop_depth;
3189#endif 3191#endif
3190 3192

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines