From 985d0e68c5f100a6996e43a08eff82981b558ec9 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 6 Feb 2006 18:24:11 +0000 Subject: Always zero all elements of siginfo_t throughout. * cygtls.h (_cygtls::thread_context): Declare new field. (_cygtls::thread_id): Ditto. (_cygtls::signal_exit): Move into this class. (_cygtls::copy_context): Declare new function. (_cygtls::signal_debugger): Ditto. * cygtls.cc (_cygtls::init_thread): Fill out thread id field. * exceptions.cc (exception): Change message when exception info is unknown. Copy context to thread local storage. (_cygtls::handle_exceptions): Avoid double test for fault_guarded. Reflect move of signal_exit to _cygtls class. (sigpacket::process): Copy context to thread local storage. (_cygtls::signal_exit): Move to _cygtls class. Call signal_debugger to notify debugger of exiting signal (WIP). Call stackdump here (WIP). (_cygtls::copy_context): Define new function. (_cygtls::signal_debugger): Ditto. * tlsoffsets.h: Regenerate. * include/cygwin.h (_fpstate): New internal structure. (ucontext): Declare new structure (WIP). (__COPY_CONTEXT_SIZE): New define. * exceptions.cc (_cygtls::interrupt_setup): Clear "threadkill" field when there is no sigwaiting thread. (setup_handler): Move event handling into interrupt_setup. --- winsup/cygwin/timer.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'winsup/cygwin/timer.cc') diff --git a/winsup/cygwin/timer.cc b/winsup/cygwin/timer.cc index 30164207d..7dea7ea69 100644 --- a/winsup/cygwin/timer.cc +++ b/winsup/cygwin/timer.cc @@ -164,8 +164,7 @@ timer_thread (VOID *x) { case SIGEV_SIGNAL: { - siginfo_t si; - memset (&si, 0, sizeof (si)); + siginfo_t si = {0}; si.si_signo = tt->evp.sigev_signo; si.si_sigval.sival_ptr = tt->evp.sigev_value.sival_ptr; si.si_code = SI_TIMER; -- cgit v1.2.3