aboutsummaryrefslogtreecommitdiff
path: root/bits
diff options
context:
space:
mode:
Diffstat (limited to 'bits')
-rw-r--r--bits/sigstack.h27
-rw-r--r--bits/ss_flags.h35
-rw-r--r--bits/types/stack_t.h33
3 files changed, 68 insertions, 27 deletions
diff --git a/bits/sigstack.h b/bits/sigstack.h
index 42143e3..3127c32 100644
--- a/bits/sigstack.h
+++ b/bits/sigstack.h
@@ -23,33 +23,6 @@
# error "Never include this file directly. Use <signal.h> instead"
#endif
-
-/* Structure describing a signal stack (obsolete). */
-struct sigstack
- {
- __ptr_t ss_sp; /* Signal stack pointer. */
- int ss_onstack; /* Nonzero if executing on this stack. */
- };
-
-
-/* Alternate, preferred interface. */
-typedef struct sigaltstack
- {
- __ptr_t ss_sp;
- size_t ss_size;
- int ss_flags;
- } stack_t;
-
-
-/* Possible values for `ss_flags.'. */
-enum
-{
- SS_ONSTACK = 0x0001,
-#define SS_ONSTACK SS_ONSTACK
- SS_DISABLE = 0x0004
-#define SS_DISABLE SS_DISABLE
-};
-
/* Minumum stack size for a signal handler. */
#define MINSIGSTKSZ 8192
diff --git a/bits/ss_flags.h b/bits/ss_flags.h
new file mode 100644
index 0000000..fa3836c
--- /dev/null
+++ b/bits/ss_flags.h
@@ -0,0 +1,35 @@
+/* ss_flags values for stack_t.
+ Copyright (C) 1998-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef _BITS_SS_FLAGS_H
+#define _BITS_SS_FLAGS_H 1
+
+#if !defined _SIGNAL_H && !defined _SYS_UCONTEXT_H
+# error "Never include this file directly. Use <signal.h> instead"
+#endif
+
+/* Possible values for `ss_flags.'. */
+enum
+{
+ SS_ONSTACK = 0x0001,
+#define SS_ONSTACK SS_ONSTACK
+ SS_DISABLE = 0x0004
+#define SS_DISABLE SS_DISABLE
+};
+
+#endif /* bits/ss_flags.h */
diff --git a/bits/types/stack_t.h b/bits/types/stack_t.h
new file mode 100644
index 0000000..3cf0a40
--- /dev/null
+++ b/bits/types/stack_t.h
@@ -0,0 +1,33 @@
+/* Define stack_t.
+ Copyright (C) 1998-2017 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef __stack_t_defined
+#define __stack_t_defined 1
+
+#define __need_size_t
+#include <stddef.h>
+
+/* Structure describing a signal stack. */
+typedef struct sigaltstack
+ {
+ void *ss_sp;
+ size_t ss_size;
+ int ss_flags;
+ } stack_t;
+
+#endif