Blame arch/nt32/bits/signal.h

20a5ca
#if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \
20a5ca
 || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
20a5ca
20a5ca
#if defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
20a5ca
#define MINSIGSTKSZ 2048
20a5ca
#define SIGSTKSZ 8192
20a5ca
#endif
20a5ca
20a5ca
#ifdef _GNU_SOURCE
20a5ca
#define REG_GS          0
20a5ca
#define REG_FS          1
20a5ca
#define REG_ES          2
20a5ca
#define REG_DS          3
20a5ca
#define REG_EDI         4
20a5ca
#define REG_ESI         5
20a5ca
#define REG_EBP         6
20a5ca
#define REG_ESP         7
20a5ca
#define REG_EBX         8
20a5ca
#define REG_EDX         9
20a5ca
#define REG_ECX         10
20a5ca
#define REG_EAX         11
20a5ca
#define REG_TRAPNO      12
20a5ca
#define REG_ERR         13
20a5ca
#define REG_EIP         14
20a5ca
#define REG_CS          15
20a5ca
#define REG_EFL         16
20a5ca
#define REG_UESP        17
20a5ca
#define REG_SS          18
20a5ca
#endif
20a5ca
20a5ca
#if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
20a5ca
typedef int greg_t, gregset_t[19];
20a5ca
typedef struct _fpstate {
20a5ca
	unsigned long cw, sw, tag, ipoff, cssel, dataoff, datasel;
20a5ca
	struct {
20a5ca
		unsigned short significand[4], exponent;
20a5ca
	} _st[8];
20a5ca
	unsigned long status;
20a5ca
} *fpregset_t;
20a5ca
struct sigcontext {
20a5ca
	unsigned short gs, __gsh, fs, __fsh, es, __esh, ds, __dsh;
20a5ca
	unsigned long edi, esi, ebp, esp, ebx, edx, ecx, eax;
20a5ca
	unsigned long trapno, err, eip;
20a5ca
	unsigned short cs, __csh;
20a5ca
	unsigned long eflags, esp_at_signal;
20a5ca
	unsigned short ss, __ssh;
20a5ca
	struct _fpstate *fpstate;
20a5ca
	unsigned long oldmask, cr2;
20a5ca
};
20a5ca
typedef struct {
20a5ca
	gregset_t gregs;
20a5ca
	fpregset_t fpregs;
20a5ca
	unsigned long oldmask, cr2;
20a5ca
} mcontext_t;
20a5ca
#else
20a5ca
typedef struct {
20a5ca
	unsigned __space[22];
20a5ca
} mcontext_t;
20a5ca
#endif
20a5ca
20a5ca
struct sigaltstack {
20a5ca
	void *ss_sp;
20a5ca
	int ss_flags;
20a5ca
	size_t ss_size;
20a5ca
};
20a5ca
20a5ca
typedef struct __ucontext {
20a5ca
	unsigned long uc_flags;
20a5ca
	struct __ucontext *uc_link;
20a5ca
	stack_t uc_stack;
20a5ca
	mcontext_t uc_mcontext;
20a5ca
	sigset_t uc_sigmask;
20a5ca
	unsigned long __fpregs_mem[28];
20a5ca
} ucontext_t;
20a5ca
20a5ca
#define SA_NOCLDSTOP  1
20a5ca
#define SA_NOCLDWAIT  2
20a5ca
#define SA_SIGINFO    4
20a5ca
#define SA_ONSTACK    0x08000000
20a5ca
#define SA_RESTART    0x10000000
20a5ca
#define SA_NODEFER    0x40000000
20a5ca
#define SA_RESETHAND  0x80000000
20a5ca
#define SA_RESTORER   0x04000000
20a5ca
20a5ca
#endif
20a5ca
20a5ca
#define SIGHUP    1
20a5ca
#define SIGINT    2
20a5ca
#define SIGQUIT   3
20a5ca
#define SIGILL    4
20a5ca
#define SIGTRAP   5
20a5ca
#define SIGABRT   6
20a5ca
#define SIGIOT    SIGABRT
20a5ca
#define SIGBUS    7
20a5ca
#define SIGFPE    8
20a5ca
#define SIGKILL   9
20a5ca
#define SIGUSR1   10
20a5ca
#define SIGSEGV   11
20a5ca
#define SIGUSR2   12
20a5ca
#define SIGPIPE   13
20a5ca
#define SIGALRM   14
20a5ca
#define SIGTERM   15
20a5ca
#define SIGSTKFLT 16
20a5ca
#define SIGCHLD   17
20a5ca
#define SIGCONT   18
20a5ca
#define SIGSTOP   19
20a5ca
#define SIGTSTP   20
20a5ca
#define SIGTTIN   21
20a5ca
#define SIGTTOU   22
20a5ca
#define SIGURG    23
20a5ca
#define SIGXCPU   24
20a5ca
#define SIGXFSZ   25
20a5ca
#define SIGVTALRM 26
20a5ca
#define SIGPROF   27
20a5ca
#define SIGWINCH  28
20a5ca
#define SIGIO     29
20a5ca
#define SIGPOLL   29
20a5ca
#define SIGPWR    30
20a5ca
#define SIGSYS    31
20a5ca
#define SIGUNUSED SIGSYS
20a5ca
20a5ca
#define _NSIG 65
20a5ca