diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-13 10:55:57 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2021-05-13 10:55:57 +0100 |
commit | 0a9d4aac126a244c0d1b8a5eb7322c78416df083 (patch) | |
tree | 16fd6effdc5c2e9dc80f27a1a7ac7b602e4c36c5 | |
parent | 425e6f7e937d104d9e4aef6ba78ad6903782548a (diff) | |
download | rspamd-0a9d4aac126a244c0d1b8a5eb7322c78416df083.tar.gz rspamd-0a9d4aac126a244c0d1b8a5eb7322c78416df083.zip |
[Minor] Backport some changes from libev
-rw-r--r-- | contrib/libev/ev.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/contrib/libev/ev.c b/contrib/libev/ev.c index 886a45ed1..94c8b1016 100644 --- a/contrib/libev/ev.c +++ b/contrib/libev/ev.c @@ -497,10 +497,10 @@ #if EV_USE_IOURING # include <sys/syscall.h> -# if !SYS_io_uring_setup && __linux && !__alpha +# if !SYS_io_uring_register && __linux && !__alpha # define SYS_io_uring_setup 425 # define SYS_io_uring_enter 426 -# define SYS_io_uring_wregister 427 +# define SYS_io_uring_register 427 # endif # if SYS_io_uring_setup && EV_USE_EPOLL /* iouring backend requires epoll backend */ # define EV_NEED_SYSCALL 1 @@ -4130,18 +4130,19 @@ ev_run (EV_P_ int flags) if (ecb_expect_true (!(flags & EVRUN_NOWAIT || idleall || !activecnt || pipe_write_skipped))) { waittime = EV_TS_CONST (MAX_BLOCKTIME); - + if (ecb_expect_true (have_monotonic)) { #if EV_USE_TIMERFD /* sleep a lot longer when we can reliably detect timejumps */ - if (ecb_expect_true (timerfd >= 0)) - waittime = EV_TS_CONST (MAX_BLOCKTIME2); + if (ecb_expect_true (timerfd != -1)) + waittime = EV_TS_CONST (MAX_BLOCKTIME2); #endif #if !EV_PERIODIC_ENABLE /* without periodics but with monotonic clock there is no need */ /* for any time jump detection, so sleep longer */ - if (ecb_expect_true (have_monotonic)) + waittime = EV_TS_CONST (MAX_BLOCKTIME2); #endif + } if (timercnt) { |