Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/release/2.12.03
-rw-r--r--winsup/cygwin/timerfd.cc11
-rw-r--r--winsup/doc/new-features.xml3
3 files changed, 9 insertions, 8 deletions
diff --git a/winsup/cygwin/release/2.12.0 b/winsup/cygwin/release/2.12.0
index 80d0c6fba..ba911ee54 100644
--- a/winsup/cygwin/release/2.12.0
+++ b/winsup/cygwin/release/2.12.0
@@ -2,7 +2,8 @@ What's new:
-----------
- 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
creates directories within the Cygwin installation dir as case
diff --git a/winsup/cygwin/timerfd.cc b/winsup/cygwin/timerfd.cc
index 87074fd6f..dc404883e 100644
--- a/winsup/cygwin/timerfd.cc
+++ b/winsup/cygwin/timerfd.cc
@@ -173,9 +173,8 @@ timerfd_tracker::thread_func ()
interval. Restart timer here with new due time. */
if (get_interval () > INT_MAX * (NS100PERSEC / MSPERSEC))
{
- /* TODO: CLOCK_REALTIME_ALARM / CLOCK_BOOTTIME_ALARM
- See comment in arm_timer */
- BOOL Resume = FALSE;
+ BOOLEAN Resume = (get_clockid () == CLOCK_REALTIME_ALARM
+ || get_clockid () == CLOCK_BOOTTIME_ALARM);
LARGE_INTEGER DueTime = { QuadPart: -get_interval () };
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);
time_spec () = *new_value;
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 */
- Resume = FALSE;
+ Resume = (_clockid == CLOCK_REALTIME_ALARM
+ || _clockid == CLOCK_BOOTTIME_ALARM);
if (_interval > INT_MAX * (NS100PERSEC / MSPERSEC))
Period = 0;
else
diff --git a/winsup/doc/new-features.xml b/winsup/doc/new-features.xml
index 2c4b3e43f..a1799d08b 100644
--- a/winsup/doc/new-features.xml
+++ b/winsup/doc/new-features.xml
@@ -10,7 +10,8 @@
<listitem><para>
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>
<listitem><para>