From 02de9ac61e84c40b18f71e7d8be15f90bb01411e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 21 Jan 2019 00:14:09 +0100 Subject: [PATCH] Cygwin: timerfd: fill out it_interval on timerfd_gettime Might not be such a bad idea, after all... Signed-off-by: Corinna Vinschen --- winsup/cygwin/timerfd.cc | 1 + winsup/cygwin/timerfd.h | 1 + 2 files changed, 2 insertions(+) diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc index cebb002ed..4f04efd13 100644 --- a/winsup/cygwin/timerfd.cc +++ b/winsup/cygwin/timerfd.cc @@ -495,6 +495,7 @@ timerfd_tracker::gettime (struct itimerspec *curr_value) next_relative_exp -= curr_value->it_value.tv_sec * NS100PERSEC; curr_value->it_value.tv_nsec = next_relative_exp * (NSPERSEC / NS100PERSEC); + curr_value->it_interval = time_spec ().it_interval; leave_critical_section (); ret = 0; } diff --git a/winsup/cygwin/timerfd.h b/winsup/cygwin/timerfd.h index cebd1d9eb..e314579b0 100644 --- a/winsup/cygwin/timerfd.h +++ b/winsup/cygwin/timerfd.h @@ -128,6 +128,7 @@ class timerfd_tracker /* cygheap! */ clock_t get_clockid () const { return tfd_shared->_clockid; } LONG64 get_clock_now () const { return tfd_shared->get_clock_now (); } + struct itimerspec &time_spec () { return tfd_shared->time_spec (); } LONG64 get_exp_ts () const { return tfd_shared->_exp_ts; } LONG64 get_interval () const { return tfd_shared->_interval; } int flags () const { return tfd_shared->flags (); }