Corinna Vinschen
2b72887ac8
Cygwin: clocks: fix a hang on pre-Windows 10 machines
...
when calling clocks too early in DLL init, the vtables are not correctly
set up for some reason. Calls to init() from now() fail because the init
pointer in the vtable is NULL.
Real life example is mintty which runs into a minor problem at startup,
triggering a system_printf call. Strace is another problem, it's called
the first time prior to any class initialization.
Workaround is to make sure that no virtual methods are called in an
early stage. Make init() non-virtual and convert resolution() to a
virtual method instead. Add a special non-virtual
clk_monotonic_t::strace_usecs.
While at it:
- Inline internal-only methods.
- Drop the `inited' member. Convert period/ticks_per_sec toa union.
Initialize period/ticks_per_sec via InterlockeExchange64.
- Fix GetTickCount64 usage. No, it's not returning ticks but
milliseconds since boot (unbiased).
- Fix comment indentation.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
2018-12-01 15:11:12 +01:00
..
2018-11-29 11:05:42 +01:00
2017-11-27 14:36:06 +01:00
2018-01-19 13:19:21 -06:00
2018-10-10 17:49:53 +02:00
2016-11-24 16:09:31 +01:00
2018-11-29 11:12:05 +01:00
2016-06-23 10:09:17 +02:00
2018-11-29 11:05:42 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-11-29 11:05:42 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2017-03-10 20:45:19 +01:00
2018-12-01 15:11:12 +01:00
2018-12-01 15:11:12 +01:00
2016-06-23 10:09:17 +02:00
2018-08-07 14:51:10 +02:00
2016-04-01 13:53:25 +02:00
2016-04-04 16:39:41 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2017-10-09 18:08:10 +02:00
2016-08-25 14:18:31 +02:00
2016-06-23 10:09:17 +02:00
2018-02-20 18:01:40 +01:00
2016-06-23 10:09:17 +02:00
2016-08-15 10:56:57 +02:00
2018-11-29 11:05:42 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-08-20 17:14:55 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-08-23 15:07:42 +01:00
2016-06-25 13:36:52 +02:00
2016-06-23 10:09:17 +02:00
2016-06-25 00:43:01 +02:00
2016-07-27 14:00:30 +02:00
2018-03-05 17:49:50 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2017-11-27 14:36:06 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-03-25 12:38:14 +02:00
2018-03-25 12:38:14 +02:00
2018-03-25 12:38:14 +02:00
2016-06-23 10:09:17 +02:00
2017-11-27 14:36:06 +01:00
2017-11-27 14:36:06 +01:00
2017-11-27 14:36:06 +01:00
2016-06-23 10:09:17 +02:00
2018-06-26 16:31:17 +02:00
2016-06-23 10:09:17 +02:00
2018-06-07 09:42:36 +02:00
2017-01-10 16:24:50 +01:00
2018-02-20 17:59:53 +01:00
2017-11-27 14:36:06 +01:00
2018-06-26 10:12:19 +02:00
2016-06-23 10:09:17 +02:00
2017-11-27 14:36:06 +01:00
2017-11-27 14:36:06 +01:00
2018-08-15 18:02:22 +02:00
2016-06-23 10:09:17 +02:00
2018-09-07 13:49:54 +02:00
2016-06-23 16:56:41 +02:00
2018-07-25 09:36:24 +02:00
2017-10-09 11:44:10 +02:00
2018-10-10 13:20:45 +02:00
2017-12-19 18:58:06 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-08-07 14:51:10 +02:00
2018-08-17 20:40:18 +02:00
2018-02-28 18:56:13 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-12-14 14:14:28 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-11-05 21:02:22 +01:00
2018-10-29 16:32:48 +01:00
2018-11-29 11:05:42 +01:00
2018-03-12 15:26:12 +01:00
2018-06-29 15:31:15 +02:00
2017-10-09 11:44:11 +02:00
2018-07-25 09:36:24 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-07-25 15:00:43 -05:00
2018-10-29 10:08:53 +01:00
2016-06-24 21:07:39 +02:00
2018-05-29 18:37:33 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 16:56:41 +02:00
2016-06-23 10:09:17 +02:00
2015-03-03 12:58:34 +00:00
2018-03-07 16:06:57 +01:00
2016-03-24 16:39:15 +01:00
2016-03-24 16:39:15 +01:00
2017-11-27 14:36:06 +01:00
2016-06-24 23:32:39 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-07-20 13:55:26 +02:00
2017-10-09 18:08:10 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2015-11-18 19:09:47 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-04-11 11:59:35 +02:00
2017-03-27 22:03:58 +01:00
2016-05-25 12:13:03 +02:00
2018-11-29 11:05:42 +01:00
2016-06-23 10:09:17 +02:00
2016-08-20 17:14:55 +02:00
2016-03-29 14:43:55 +02:00
2016-03-24 16:39:15 +01:00
2018-08-07 14:51:10 +02:00
2018-08-07 14:51:10 +02:00
2015-08-17 11:05:43 +02:00
2017-04-06 18:17:08 +02:00
2016-06-23 10:09:17 +02:00
2017-12-10 14:14:28 +01:00
2017-03-27 20:28:03 +02:00
2016-06-23 21:30:15 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-10-29 16:32:48 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2017-06-06 18:27:47 +02:00
2018-11-29 11:05:42 +01:00
2016-06-23 10:09:17 +02:00
2016-12-14 14:14:28 +01:00
2017-11-27 14:36:06 +01:00
2018-09-01 21:06:24 +02:00
2018-06-26 16:31:17 +02:00
2016-09-08 13:36:31 +02:00
2016-06-23 10:09:17 +02:00
2018-06-07 09:42:36 +02:00
2017-04-24 14:22:02 +02:00
2017-11-02 18:01:01 +01:00
2018-02-23 15:24:18 +01:00
2018-02-07 13:07:44 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-02-17 10:55:28 +01:00
2018-06-27 17:56:59 +02:00
2018-08-27 18:28:33 +02:00
2016-06-23 16:56:41 +02:00
2018-04-16 22:46:11 -05:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-02-07 13:07:44 +01:00
2017-06-19 08:16:42 -05:00
2018-11-29 11:05:42 +01:00
2017-11-27 14:36:06 +01:00
2017-01-09 14:02:19 +01:00
2018-08-27 13:48:07 +02:00
2016-03-10 10:36:00 +01:00
2016-03-08 13:56:40 +01:00
2016-08-19 16:50:15 +02:00
2018-02-21 21:40:01 +01:00
2018-11-29 11:05:42 +01:00
2018-03-25 12:38:14 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2017-03-28 13:41:31 +02:00
2017-03-27 22:03:58 +01:00
2016-06-23 10:09:17 +02:00
2018-11-29 11:05:42 +01:00
2017-10-09 11:44:11 +02:00
2016-06-23 10:09:17 +02:00
2018-03-12 22:13:20 +01:00
2016-06-25 00:42:36 +02:00
2018-11-26 17:59:10 +01:00
2018-12-01 15:11:12 +01:00
2018-03-02 18:17:17 +01:00
2016-06-23 10:09:17 +02:00
2018-07-03 15:38:47 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-03-01 16:51:12 +01:00
2018-11-29 11:05:42 +01:00
2018-07-06 10:41:21 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-11-29 11:05:42 +01:00
2018-06-27 17:56:59 +02:00
2018-11-29 11:05:42 +01:00
2018-11-29 11:05:42 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2015-07-04 22:49:30 +02:00
2015-07-04 22:49:30 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 16:56:41 +02:00
2016-06-23 10:09:17 +02:00
2018-08-28 11:28:28 +02:00
2018-04-11 11:59:35 +02:00
2016-06-23 10:09:17 +02:00
2016-09-08 13:36:29 +02:00
2016-06-23 10:09:17 +02:00
2016-08-15 10:56:57 +02:00
2018-11-29 11:05:42 +01:00
2018-11-29 11:05:42 +01:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2016-06-23 10:09:17 +02:00
2018-03-25 12:38:14 +02:00
2016-06-23 10:09:17 +02:00
2016-03-29 14:43:55 +02:00