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

Comparing libev/ev.c (file contents):
Revision 1.482 by root, Sat Jul 28 04:15:15 2018 UTC vs.
Revision 1.484 by root, Tue Jul 31 05:40:58 2018 UTC

162# define EV_USE_EVENTFD 0 162# define EV_USE_EVENTFD 0
163# endif 163# endif
164 164
165#endif 165#endif
166 166
167/* OS X, in its infinite idiocy, actually HARDCODES
168 * a limit of 1024 into their select. Where people have brains,
169 * OS X engineers apparently have a vacuum. Or maybe they were
170 * ordered to have a vacuum, or they do anything for money.
171 * This might help. Or not.
172 * Note that this must be defined early, as other include files
173 * will rely on this define as well.
174 */
175#define _DARWIN_UNLIMITED_SELECT 1
176
167#include <stdlib.h> 177#include <stdlib.h>
168#include <string.h> 178#include <string.h>
169#include <fcntl.h> 179#include <fcntl.h>
170#include <stddef.h> 180#include <stddef.h>
171 181
208# ifndef EV_SELECT_IS_WINSOCKET 218# ifndef EV_SELECT_IS_WINSOCKET
209# define EV_SELECT_IS_WINSOCKET 1 219# define EV_SELECT_IS_WINSOCKET 1
210# endif 220# endif
211# undef EV_AVOID_STDIO 221# undef EV_AVOID_STDIO
212#endif 222#endif
213
214/* OS X, in its infinite idiocy, actually HARDCODES
215 * a limit of 1024 into their select. Where people have brains,
216 * OS X engineers apparently have a vacuum. Or maybe they were
217 * ordered to have a vacuum, or they do anything for money.
218 * This might help. Or not.
219 */
220#define _DARWIN_UNLIMITED_SELECT 1
221 223
222/* this block tries to deduce configuration from header-defined symbols and defaults */ 224/* this block tries to deduce configuration from header-defined symbols and defaults */
223 225
224/* try to deduce the maximum number of signals on this platform */ 226/* try to deduce the maximum number of signals on this platform */
225#if defined EV_NSIG 227#if defined EV_NSIG
3302void 3304void
3303ev_invoke_pending (EV_P) 3305ev_invoke_pending (EV_P)
3304{ 3306{
3305 pendingpri = NUMPRI; 3307 pendingpri = NUMPRI;
3306 3308
3307 while (pendingpri) /* pendingpri possibly gets modified in the inner loop */ 3309 do
3308 { 3310 {
3309 --pendingpri; 3311 --pendingpri;
3310 3312
3313 /* pendingpri possibly gets modified in the inner loop */
3311 while (pendingcnt [pendingpri]) 3314 while (pendingcnt [pendingpri])
3312 { 3315 {
3313 ANPENDING *p = pendings [pendingpri] + --pendingcnt [pendingpri]; 3316 ANPENDING *p = pendings [pendingpri] + --pendingcnt [pendingpri];
3314 3317
3315 p->w->pending = 0; 3318 p->w->pending = 0;
3316 EV_CB_INVOKE (p->w, p->events); 3319 EV_CB_INVOKE (p->w, p->events);
3317 EV_FREQUENT_CHECK; 3320 EV_FREQUENT_CHECK;
3318 } 3321 }
3319 } 3322 }
3323 while (pendingpri);
3320} 3324}
3321 3325
3322#if EV_IDLE_ENABLE 3326#if EV_IDLE_ENABLE
3323/* make idle watchers pending. this handles the "call-idle */ 3327/* make idle watchers pending. this handles the "call-idle */
3324/* only when higher priorities are idle" logic */ 3328/* only when higher priorities are idle" logic */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines