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

Comparing libev/ev.c (file contents):
Revision 1.532 by root, Thu Mar 19 08:31:35 2020 UTC vs.
Revision 1.535 by sf-exg, Mon May 17 15:41:10 2021 UTC

491# endif 491# endif
492#endif 492#endif
493 493
494#if EV_USE_IOURING 494#if EV_USE_IOURING
495# include <sys/syscall.h> 495# include <sys/syscall.h>
496# if !SYS_io_uring_setup && __linux && !__alpha 496# if !SYS_io_uring_register && __linux && !__alpha
497# define SYS_io_uring_setup 425 497# define SYS_io_uring_setup 425
498# define SYS_io_uring_enter 426 498# define SYS_io_uring_enter 426
499# define SYS_io_uring_wregister 427 499# define SYS_io_uring_register 427
500# endif 500# endif
501# if SYS_io_uring_setup && EV_USE_EPOLL /* iouring backend requires epoll backend */ 501# if SYS_io_uring_setup && EV_USE_EPOLL /* iouring backend requires epoll backend */
502# define EV_NEED_SYSCALL 1 502# define EV_NEED_SYSCALL 1
503# else 503# else
504# undef EV_USE_IOURING 504# undef EV_USE_IOURING
4092 4092
4093 if (ecb_expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped))) 4093 if (ecb_expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped)))
4094 { 4094 {
4095 waittime = EV_TS_CONST (MAX_BLOCKTIME); 4095 waittime = EV_TS_CONST (MAX_BLOCKTIME);
4096 4096
4097#if EV_USE_MONOTONIC
4098 if (ecb_expect_true (have_monotonic))
4099 {
4097#if EV_USE_TIMERFD 4100#if EV_USE_TIMERFD
4098 /* sleep a lot longer when we can reliably detect timejumps */ 4101 /* sleep a lot longer when we can reliably detect timejumps */
4099 if (ecb_expect_true (timerfd >= 0)) 4102 if (ecb_expect_true (timerfd != -1))
4100 waittime = EV_TS_CONST (MAX_BLOCKTIME2); 4103 waittime = EV_TS_CONST (MAX_BLOCKTIME2);
4101#endif 4104#endif
4102#if !EV_PERIODIC_ENABLE 4105#if !EV_PERIODIC_ENABLE
4103 /* without periodics but with monotonic clock there is no need */ 4106 /* without periodics but with monotonic clock there is no need */
4104 /* for any time jump detection, so sleep longer */ 4107 /* for any time jump detection, so sleep longer */
4105 if (ecb_expect_true (have_monotonic))
4106 waittime = EV_TS_CONST (MAX_BLOCKTIME2); 4108 waittime = EV_TS_CONST (MAX_BLOCKTIME2);
4109#endif
4110 }
4107#endif 4111#endif
4108 4112
4109 if (timercnt) 4113 if (timercnt)
4110 { 4114 {
4111 ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now; 4115 ev_tstamp to = ANHE_at (timers [HEAP0]) - mn_now;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines