Cygwin: timerfd: Add support for CLOCK_REALTIME_ALARM/CLOCK_BOOTTIME_ALARM

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen 2019-01-22 15:46:17 +01:00
parent 013e2bd9ec
commit 6c44af8179
3 changed files with 9 additions and 8 deletions

View File

@ -2,7 +2,8 @@ What's new:
----------- -----------
- Support for CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, - Support for CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE,
CLOCK_MONOTONIC_RAW, CLOCK_BOOTTIME clocks. CLOCK_MONOTONIC_RAW, CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM,
CLOCK_BOOTTIME_ALARM clocks.
- Support for case sensitive directories. mkdir(2) automatically - Support for case sensitive directories. mkdir(2) automatically
creates directories within the Cygwin installation dir as case creates directories within the Cygwin installation dir as case

View File

@ -173,9 +173,8 @@ timerfd_tracker::thread_func ()
interval. Restart timer here with new due time. */ interval. Restart timer here with new due time. */
if (get_interval () > INT_MAX * (NS100PERSEC / MSPERSEC)) if (get_interval () > INT_MAX * (NS100PERSEC / MSPERSEC))
{ {
/* TODO: CLOCK_REALTIME_ALARM / CLOCK_BOOTTIME_ALARM BOOLEAN Resume = (get_clockid () == CLOCK_REALTIME_ALARM
See comment in arm_timer */ || get_clockid () == CLOCK_BOOTTIME_ALARM);
BOOL Resume = FALSE;
LARGE_INTEGER DueTime = { QuadPart: -get_interval () }; LARGE_INTEGER DueTime = { QuadPart: -get_interval () };
NtSetTimer (tfd_shared->timer (), &DueTime, NULL, NULL, NtSetTimer (tfd_shared->timer (), &DueTime, NULL, NULL,
@ -573,10 +572,10 @@ timerfd_shared::arm_timer (int flags, const struct itimerspec *new_value)
set_exp_ts (ts); set_exp_ts (ts);
time_spec () = *new_value; time_spec () = *new_value;
read_and_reset_expiration_count (); read_and_reset_expiration_count ();
/* TODO: CLOCK_REALTIME_ALARM / CLOCK_BOOTTIME_ALARM /* Note: Advanced Power Settings -> Sleep -> Allow Wake Timers
Note: Advanced Power Settings -> Sleep -> Allow Wake Timers
since W10 1709 */ since W10 1709 */
Resume = FALSE; Resume = (_clockid == CLOCK_REALTIME_ALARM
|| _clockid == CLOCK_BOOTTIME_ALARM);
if (_interval > INT_MAX * (NS100PERSEC / MSPERSEC)) if (_interval > INT_MAX * (NS100PERSEC / MSPERSEC))
Period = 0; Period = 0;
else else

View File

@ -10,7 +10,8 @@
<listitem><para> <listitem><para>
Support for CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE, Support for CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_COARSE,
CLOCK_MONOTONIC_RAW, CLOCK_BOOTTIME clocks. CLOCK_MONOTONIC_RAW, CLOCK_BOOTTIME, CLOCK_REALTIME_ALARM,
CLOCK_BOOTTIME_ALARM clocks.
</para></listitem> </para></listitem>
<listitem><para> <listitem><para>