On Mar 31 18:46, Jon TURNEY wrote: > Add ucontext.h header, defining ucontext_t and mcontext_t types. > > Provide sigaction sighandlers with a ucontext_t parameter, containing stack and > context information. > > XXX: How do we indicate context information is not available (si_cyg == NULL) If si_cyg is NULL, fetch the current context via RtlCaptureContext. Two minor nits. With the outlined changes, ok to apply. > + if (thissi.si_cyg) > + { > + memcpy (&context.uc_mcontext, ((cygwin_exception *)thissi.si_cyg)->context(), sizeof(CONTEXT)); > + } > + At this point, please add a FIXME comment rambling along about having to tweak this code when we implement sigaltstack. > + context.uc_stack.ss_sp = NtCurrentTeb ()->Tib.StackBase; > + context.uc_stack.ss_flags = 0; > + if (!NtCurrentTeb ()->DeallocationStack) > + context.uc_stack.ss_size = (uintptr_t)NtCurrentTeb ()->Tib.StackLimit - (uintptr_t)NtCurrentTeb ()->Tib.StackBase; > + else > + context.uc_stack.ss_size = (uintptr_t)NtCurrentTeb ()->DeallocationStack - (uintptr_t)NtCurrentTeb ()->Tib.StackBase; > + > +#ifndef _SYS_UCONTEXT_H_ > +#define _SYS_UCONTEXT_H_ > + > +#include > +#include Just include as on Linux, unless there's a really good reason. Thanks, Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Maintainer cygwin AT cygwin DOT com Red Hat