Cygwin: implement extensible clock interface
authorCorinna Vinschen <corinna@vinschen.de>
Tue, 27 Nov 2018 12:47:02 +0000 (13:47 +0100)
committerCorinna Vinschen <corinna@vinschen.de>
Thu, 29 Nov 2018 10:05:42 +0000 (11:05 +0100)
commitc05df02725c5986d029eeec63beb467bdd6286ef
tree0909ef492429678576c087f34b71937dc8ad0665
parentf4d6ef2d417e0fc10a159ab64827f837c9a3be84
Cygwin: implement extensible clock interface

- Drop hires_[nm]s clocks, rename hires.h to clock.h.

- Implement clk_t class as an extensible clock class in new file clock.cc.

- Introduce get_clock(clock_id) returning a pointer to the clk_t instance
  for clock_id.  Provide the following methods along the lines of the former
  hires classes:

void clk_t::nsecs (struct timespec *);
ULONGLONG clk_t::nsecs ();
LONGLONG clk_t::usecs ();
LONGLONG clk_t::msecs ();
void  clk_t::resolution (struct timespec *);

- Add CLOCK_REALTIME_COARSE, CLOCK_MONOTONIC_RAW, CLOCK_MONOTONIC_COARSE
  and CLOCK_BOOTTIME clocks.

- Allow clock_nanosleep, pthread_condattr_setclock and timer_create to use
  all new clocks (both clocks should be usable with a small tweak, though).

- Bump DLL major version to 2.12.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
20 files changed:
winsup/cygwin/Makefile.in
winsup/cygwin/aio.cc
winsup/cygwin/autoload.cc
winsup/cygwin/clock.cc [new file with mode: 0644]
winsup/cygwin/clock.h [new file with mode: 0644]
winsup/cygwin/cygheap.h
winsup/cygwin/fhandler_socket_unix.cc
winsup/cygwin/hires.h [deleted file]
winsup/cygwin/include/cygwin/version.h
winsup/cygwin/ntdll.h
winsup/cygwin/sched.cc
winsup/cygwin/select.cc
winsup/cygwin/signal.cc
winsup/cygwin/strace.cc
winsup/cygwin/sysconf.cc
winsup/cygwin/thread.cc
winsup/cygwin/timer.cc
winsup/cygwin/times.cc
winsup/cygwin/wincap.cc
winsup/cygwin/wincap.h
This page took 0.073562 seconds and 5 git commands to generate.