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:
@ -27,7 +27,7 @@ details. */
|
||||
#include "child_info.h"
|
||||
#include "ntdll.h"
|
||||
#include "exception.h"
|
||||
#include "timer.h"
|
||||
#include "posix_timer.h"
|
||||
|
||||
/* Definitions for code simplification */
|
||||
#ifdef __x86_64__
|
||||
@ -1483,7 +1483,7 @@ sigpacket::process ()
|
||||
if (handler == SIG_IGN)
|
||||
{
|
||||
if (si.si_code == SI_TIMER)
|
||||
((timer_tracker *) si.si_tid)->disarm_event ();
|
||||
((timer_tracker *) si.si_tid)->disarm_overrun_event ();
|
||||
sigproc_printf ("signal %d ignored", si.si_signo);
|
||||
goto done;
|
||||
}
|
||||
@ -1508,7 +1508,7 @@ sigpacket::process ()
|
||||
|| si.si_signo == SIGURG)
|
||||
{
|
||||
if (si.si_code == SI_TIMER)
|
||||
((timer_tracker *) si.si_tid)->disarm_event ();
|
||||
((timer_tracker *) si.si_tid)->disarm_overrun_event ();
|
||||
sigproc_printf ("signal %d default is currently ignore", si.si_signo);
|
||||
goto done;
|
||||
}
|
||||
@ -1637,7 +1637,7 @@ _cygtls::call_signal_handler ()
|
||||
{
|
||||
timer_tracker *tt = (timer_tracker *)
|
||||
infodata.si_tid;
|
||||
infodata.si_overrun = tt->disarm_event ();
|
||||
infodata.si_overrun = tt->disarm_overrun_event ();
|
||||
}
|
||||
|
||||
/* Save information locally on stack to pass to handler. */
|
||||
|
Reference in New Issue
Block a user