Add POSIX siginfo_t's si_code, this is for upcoming POSIX realtime signal
support in kernel. Earlier patch reviewed by: jhb, deischen
This commit is contained in:
parent
fd6238a659
commit
ac2587e125
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=151306
@ -72,16 +72,6 @@
|
||||
#define ILL_ALIGN_FAULT T_ALIGNFLT
|
||||
#define ILL_FPOP_FAULT T_FPOPFLT /* coprocessor operand fault */
|
||||
|
||||
/* portable macros for SIGFPE/ARITHTRAP */
|
||||
#define FPE_INTOVF 1 /* integer overflow */
|
||||
#define FPE_INTDIV 2 /* integer divide by zero */
|
||||
#define FPE_FLTDIV 3 /* floating point divide by zero */
|
||||
#define FPE_FLTOVF 4 /* floating point overflow */
|
||||
#define FPE_FLTUND 5 /* floating point underflow */
|
||||
#define FPE_FLTRES 6 /* floating point inexact result */
|
||||
#define FPE_FLTINV 7 /* invalid floating point operation */
|
||||
#define FPE_FLTSUB 8 /* subscript out of range */
|
||||
|
||||
/* old FreeBSD macros, deprecated */
|
||||
#define FPE_INTOVF_TRAP 0x1 /* integer overflow */
|
||||
#define FPE_INTDIV_TRAP 0x2 /* integer divide by zero */
|
||||
|
@ -111,9 +111,9 @@
|
||||
#if __BSD_VISIBLE
|
||||
#define SIGTHR 32 /* Thread interrupt. */
|
||||
#endif
|
||||
/*
|
||||
* XXX missing SIGRTMIN, SIGRTMAX.
|
||||
*/
|
||||
|
||||
#define SIGRTMIN 65
|
||||
#define SIGRTMAX 128
|
||||
|
||||
#define SIG_DFL ((__sighandler_t *)0)
|
||||
#define SIG_IGN ((__sighandler_t *)1)
|
||||
@ -199,8 +199,69 @@ typedef struct __siginfo {
|
||||
void *si_addr; /* faulting instruction */
|
||||
union sigval si_value; /* signal value */
|
||||
long si_band; /* band event for SIGPOLL */
|
||||
int __spare__[7]; /* gimme some slack */
|
||||
union {
|
||||
struct {
|
||||
int _trapno;/* machine specific trap code */
|
||||
} _fault;
|
||||
int __spare__[7]; /* gimme some slack */
|
||||
} _reason;
|
||||
} siginfo_t;
|
||||
|
||||
#define si_trapno _reason._fault._trapno
|
||||
|
||||
/** si_code **/
|
||||
/* codes for SIGILL */
|
||||
#define ILL_ILLOPC 1 /* Illegal opcode. */
|
||||
#define ILL_ILLOPN 2 /* Illegal operand. */
|
||||
#define ILL_ILLADR 3 /* Illegal addressing mode. */
|
||||
#define ILL_ILLTRP 4 /* Illegal trap. */
|
||||
#define ILL_PRVOPC 5 /* Privileged opcode. */
|
||||
#define ILL_PRVREG 6 /* Privileged register. */
|
||||
#define ILL_COPROC 7 /* Coprocessor error. */
|
||||
#define ILL_BADSTK 8 /* Internal stack error. */
|
||||
|
||||
/* codes for SIGBUS */
|
||||
#define BUS_ADRALN 1 /* Invalid address alignment. */
|
||||
#define BUS_ADRERR 2 /* Nonexistent physical address. */
|
||||
#define BUS_OBJERR 3 /* Object-specific hardware error. */
|
||||
|
||||
/* codes for SIGSEGV */
|
||||
#define SEGV_MAPERR 1 /* Address not mapped to object. */
|
||||
#define SEGV_ACCERR 2 /* Invalid permissions for mapped */
|
||||
/* object. */
|
||||
|
||||
/* codes for SIGFPE */
|
||||
#define FPE_INTOVF 1 /* Integer overflow. */
|
||||
#define FPE_INTDIV 2 /* Integer divide by zero. */
|
||||
#define FPE_FLTDIV 3 /* Floating point divide by zero. */
|
||||
#define FPE_FLTOVF 4 /* Floating point overflow. */
|
||||
#define FPE_FLTUND 5 /* Floating point underflow. */
|
||||
#define FPE_FLTRES 6 /* Floating point inexact result. */
|
||||
#define FPE_FLTINV 7 /* Invalid floating point operation. */
|
||||
#define FPE_FLTSUB 8 /* Subscript out of range. */
|
||||
|
||||
/* codes for SIGTRAP */
|
||||
#define TRAP_BRKPT 1 /* Process breakpoint. */
|
||||
#define TRAP_TRACE 2 /* Process trace trap. */
|
||||
|
||||
/* codes for SIGCHLD */
|
||||
#define CLD_EXITED 1 /* Child has exited */
|
||||
#define CLD_KILLED 2 /* Child has terminated abnormally but */
|
||||
/* did not create a core file */
|
||||
#define CLD_DUMPED 3 /* Child has terminated abnormally and */
|
||||
/* created a core file */
|
||||
#define CLD_TRAPPED 4 /* Traced child has trapped */
|
||||
#define CLD_STOPPED 5 /* Child has stopped */
|
||||
#define CLD_CONTINUED 6 /* Stopped child has continued */
|
||||
|
||||
/* codes for SIGPOLL */
|
||||
#define POLL_IN 1 /* Data input available */
|
||||
#define POLL_OUT 2 /* Output buffers available */
|
||||
#define POLL_MSG 3 /* Input message available */
|
||||
#define POLL_ERR 4 /* I/O Error */
|
||||
#define POLL_PRI 5 /* High priority input available */
|
||||
#define POLL_HUP 4 /* Device disconnected */
|
||||
|
||||
#endif
|
||||
|
||||
#if __POSIX_VISIBLE || __XSI_VISIBLE
|
||||
@ -244,11 +305,14 @@ struct sigaction {
|
||||
#endif
|
||||
|
||||
#if __POSIX_VISIBLE || __XSI_VISIBLE
|
||||
#define SI_USER 0x10001
|
||||
#define SI_QUEUE 0x10002
|
||||
#define SI_TIMER 0x10003
|
||||
#define SI_ASYNCIO 0x10004
|
||||
#define SI_MESGQ 0x10005
|
||||
#define SI_USER 0x10001 /* Signal sent by kill(). */
|
||||
#define SI_QUEUE 0x10002 /* Signal sent by the sigqueue(). */
|
||||
#define SI_TIMER 0x10003 /* Signal generated by expiration of */
|
||||
/* a timer set by timer_settime(). */
|
||||
#define SI_ASYNCIO 0x10004 /* Signal generated by completion of */
|
||||
/* an asynchronous I/O request.*/
|
||||
#define SI_MESGQ 0x10005 /* Signal generated by arrival of a */
|
||||
/* message on an empty message queue. */
|
||||
#endif
|
||||
#if __BSD_VISIBLE
|
||||
#define SI_UNDEFINED 0
|
||||
|
Loading…
Reference in New Issue
Block a user