Cygwin: posix timers: implement timer_getoverrun
- set DELAYTIMER_MAX to INT_MAX - make sure to set siginfo_t::si_overrun, as on Linux Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@@ -27,6 +27,7 @@ details. */
|
||||
#include "child_info.h"
|
||||
#include "ntdll.h"
|
||||
#include "exception.h"
|
||||
#include "timer.h"
|
||||
|
||||
/* Definitions for code simplification */
|
||||
#ifdef __x86_64__
|
||||
@@ -1473,6 +1474,8 @@ sigpacket::process ()
|
||||
|
||||
if (handler == SIG_IGN)
|
||||
{
|
||||
if (si.si_code == SI_TIMER)
|
||||
((timer_tracker *) si.si_tid)->disarm_event ();
|
||||
sigproc_printf ("signal %d ignored", si.si_signo);
|
||||
goto done;
|
||||
}
|
||||
@@ -1496,6 +1499,8 @@ sigpacket::process ()
|
||||
|| si.si_signo == SIGCONT || si.si_signo == SIGWINCH
|
||||
|| si.si_signo == SIGURG)
|
||||
{
|
||||
if (si.si_code == SI_TIMER)
|
||||
((timer_tracker *) si.si_tid)->disarm_event ();
|
||||
sigproc_printf ("signal %d default is currently ignore", si.si_signo);
|
||||
goto done;
|
||||
}
|
||||
@@ -1620,6 +1625,13 @@ _cygtls::call_signal_handler ()
|
||||
|
||||
sigset_t this_oldmask = set_process_mask_delta ();
|
||||
|
||||
if (infodata.si_code == SI_TIMER)
|
||||
{
|
||||
timer_tracker *tt = (timer_tracker *)
|
||||
infodata.si_tid;
|
||||
infodata.si_overrun = tt->disarm_event ();
|
||||
}
|
||||
|
||||
/* Save information locally on stack to pass to handler. */
|
||||
int thissig = sig;
|
||||
siginfo_t thissi = infodata;
|
||||
|
Reference in New Issue
Block a user