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

Comparing libev/ev.c (file contents):
Revision 1.511 by root, Fri Nov 22 14:32:13 2019 UTC vs.
Revision 1.514 by root, Fri Dec 20 05:20:50 2019 UTC

448# undef EV_USE_INOTIFY 448# undef EV_USE_INOTIFY
449# define EV_USE_INOTIFY 0 449# define EV_USE_INOTIFY 0
450#endif 450#endif
451 451
452#if __linux && EV_USE_IOURING 452#if __linux && EV_USE_IOURING
453# include <linux/fs.h> 453# include <linux/version.h>
454# ifndef RWF_SYNC 454# if LINUX_VERSION_CODE < KERNEL_VERSION(4,14,0)
455# undef EV_USE_IOURING 455# undef EV_USE_IOURING
456# define EV_USE_IOURING 0 456# define EV_USE_IOURING 0
457# endif 457# endif
458#endif 458#endif
459 459
3858 3858
3859 /* don't let timeouts decrease the waittime below timeout_blocktime */ 3859 /* don't let timeouts decrease the waittime below timeout_blocktime */
3860 if (ecb_expect_false (waittime < timeout_blocktime)) 3860 if (ecb_expect_false (waittime < timeout_blocktime))
3861 waittime = timeout_blocktime; 3861 waittime = timeout_blocktime;
3862 3862
3863 /* at this point, we NEED to wait, so we have to ensure */ 3863 /* now there are two more special cases left, either we have
3864 /* to pass a minimum nonzero value to the backend */ 3864 * already-expired timers, so we should not sleep, or we have timers
3865 * that expire very soon, in which case we need to wait for a minimum
3866 * amount of time for some event loop backends.
3867 */
3865 if (ecb_expect_false (waittime < backend_mintime)) 3868 if (ecb_expect_false (waittime < backend_mintime))
3869 waittime = waittime <= EV_TS_CONST (0.)
3870 ? EV_TS_CONST (0.)
3866 waittime = backend_mintime; 3871 : backend_mintime;
3867 3872
3868 /* extra check because io_blocktime is commonly 0 */ 3873 /* extra check because io_blocktime is commonly 0 */
3869 if (ecb_expect_false (io_blocktime)) 3874 if (ecb_expect_false (io_blocktime))
3870 { 3875 {
3871 sleeptime = io_blocktime - (mn_now - prev_mn_now); 3876 sleeptime = io_blocktime - (mn_now - prev_mn_now);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines