add pkey_{mprotect,alloc,free} syscalls from linux v4.9
[musl] / arch / x86_64 / bits / signal.h
index 9043aea..e3c3141 100644 (file)
@@ -1,6 +1,37 @@
 #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
  || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 
+#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
+#define MINSIGSTKSZ 2048
+#define SIGSTKSZ 8192
+#endif
+
+#ifdef _GNU_SOURCE
+#define REG_R8          0
+#define REG_R9          1
+#define REG_R10         2
+#define REG_R11         3
+#define REG_R12         4
+#define REG_R13         5
+#define REG_R14         6
+#define REG_R15         7
+#define REG_RDI         8
+#define REG_RSI         9
+#define REG_RBP         10
+#define REG_RBX         11
+#define REG_RDX         12
+#define REG_RAX         13
+#define REG_RCX         14
+#define REG_RSP         15
+#define REG_RIP         16
+#define REG_EFL         17
+#define REG_CSGSFS      18
+#define REG_ERR         19
+#define REG_TRAPNO      20
+#define REG_OLDMASK     21
+#define REG_CR2         22
+#endif
+
 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
 typedef long long greg_t, gregset_t[23];
 typedef struct _fpstate {
@@ -34,6 +65,12 @@ typedef struct {
 } mcontext_t;
 #endif
 
+struct sigaltstack {
+       void *ss_sp;
+       int ss_flags;
+       size_t ss_size;
+};
+
 typedef struct __ucontext {
        unsigned long uc_flags;
        struct __ucontext *uc_link;
@@ -60,6 +97,7 @@ typedef struct __ucontext {
 #define SIGILL    4
 #define SIGTRAP   5
 #define SIGABRT   6
+#define SIGIOT    SIGABRT
 #define SIGBUS    7
 #define SIGFPE    8
 #define SIGKILL   9
@@ -89,3 +127,4 @@ typedef struct __ucontext {
 #define SIGUNUSED SIGSYS
 
 #define _NSIG 65
+