Cygwin: posix timers: reimplement using OS timer

- Rename files timer.* to posix_timer.*.
- Reimplement using an OS timer rather than a handcrafted wait loop.
- Use a Slim R/W Lock for synchronization.
- Drop timer chaining.  It doesn't server a purpose since all timers
  are local only.
- Rename ttstart to itimer_tracker to better reflect its purpose.
  It's not the anchor for a timer chain anymore anyway.
- Drop fixup_timers_after_fork.  Everything is process-local, nothing
  gets inherited.
- Rename timer_tracker::disarm_event to disarm_overrun_event for
  better readability.

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-01-22 15:23:05 +01:00
parent 4c50dc94c3
commit 229ea3f23c
7 changed files with 298 additions and 248 deletions

View File

@ -22,7 +22,6 @@ details. */
#include "tls_pbuf.h"
#include "dll_init.h"
#include "cygmalloc.h"
#include "timer.h"
#include "ntdll.h"
#define NPIDS_HELD 4
@ -196,7 +195,6 @@ frok::child (volatile char * volatile here)
ForceCloseHandle1 (fork_info->forker_finished, forker_finished);
pthread::atforkchild ();
fixup_timers_after_fork ();
cygbench ("fork-child");
ld_preload ();
fixup_hooks_after_fork ();