summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/include/sys
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2015-03-30 20:31:13 +0100
committerCorinna Vinschen <corinna@vinschen.de>2015-04-23 21:57:10 +0200
commit9e8932d6dac0d0acdedaf363adbf2265111ed27c (patch)
treedec9b462aed93fbb3f5e8861184c9572256756ac /winsup/cygwin/include/sys
parent38a8d3e216fa57e21964f013d4985539d54de663 (diff)
downloadcygnal-9e8932d6dac0d0acdedaf363adbf2265111ed27c.tar.gz
cygnal-9e8932d6dac0d0acdedaf363adbf2265111ed27c.tar.bz2
cygnal-9e8932d6dac0d0acdedaf363adbf2265111ed27c.zip
Provide ucontext to signal handlers
Add ucontext.h header, defining ucontext_t and mcontext_t types. Provide sigaction sighandlers with a ucontext_t parameter, containing stack and context information. * include/sys/ucontext.h : New header. * include/ucontext.h : Ditto. * exceptions.cc (call_signal_handler): Provide ucontext_t parameter to signal handler function. Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk>
Diffstat (limited to 'winsup/cygwin/include/sys')
-rw-r--r--winsup/cygwin/include/sys/ucontext.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/winsup/cygwin/include/sys/ucontext.h b/winsup/cygwin/include/sys/ucontext.h
new file mode 100644
index 000000000..9362d90cd
--- /dev/null
+++ b/winsup/cygwin/include/sys/ucontext.h
@@ -0,0 +1,26 @@
+/* ucontext.h
+
+ Copyright 2015 Red Hat, Inc.
+
+This file is part of Cygwin.
+
+This software is a copyrighted work licensed under the terms of the
+Cygwin license. Please consult the file "CYGWIN_LICENSE" for
+details. */
+
+#ifndef _SYS_UCONTEXT_H_
+#define _SYS_UCONTEXT_H_
+
+#include <signal.h>
+
+typedef struct __mcontext mcontext_t;
+
+typedef struct __ucontext {
+ struct __ucontext *uc_link;
+ sigset_t uc_sigmask;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ unsigned long int uc_flags;
+} ucontext_t;
+
+#endif /* !_SYS_UCONTEXT_H_ */