From 1daece586130467b632f7011395c514b6d8811f8 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 22 Jan 2019 15:42:07 +0100 Subject: [PATCH] Cygwin: clocks: Add CLOCK_REALTIME_ALARM/CLOCK_BOOTTIME_ALARM clocks Signed-off-by: Corinna Vinschen --- winsup/cygwin/clock.cc | 4 ++++ winsup/cygwin/clock.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/clock.cc b/winsup/cygwin/clock.cc index 18d628884..9c0b787ba 100644 --- a/winsup/cygwin/clock.cc +++ b/winsup/cygwin/clock.cc @@ -274,6 +274,8 @@ static clk_monotonic_t clk_monotonic; static clk_monotonic_t clk_monotonic_raw; /* same as clk_monotonic */ static clk_monotonic_coarse_t clk_monotonic_coarse; static clk_boottime_t clk_boottime; +static clk_realtime_t clk_realtime_alarm; /* same as clk_realtime */ +static clk_boottime_t clk_boottime_alarm; /* same as clk_boottime_t */ clk_t *cyg_clock[MAX_CLOCKS] = { @@ -285,6 +287,8 @@ clk_t *cyg_clock[MAX_CLOCKS] = &clk_monotonic_raw, &clk_monotonic_coarse, &clk_boottime, + &clk_realtime_alarm, + &clk_boottime_alarm, }; clk_t * diff --git a/winsup/cygwin/clock.h b/winsup/cygwin/clock.h index 538b4b284..7323299df 100644 --- a/winsup/cygwin/clock.h +++ b/winsup/cygwin/clock.h @@ -12,7 +12,7 @@ details. */ #include /* Must be a power of 2. */ -#define MAX_CLOCKS (8) +#define MAX_CLOCKS (16) /* Conversions for per-process and per-thread clocks */ #define CLOCKID(cid) \