typedefunion sigval { int sival_int; void __user *sival_ptr;
} sigval_t;
#define SI_MAX_SIZE 128
/* * The default "si_band" type is "long", as specified by POSIX. * However, some architectures want to override this to "int" * for historical compatibility reasons, so we allow that.
*/ #ifndef __ARCH_SI_BAND_T #define __ARCH_SI_BAND_T long #endif
/* * Be careful when extending this union. On 32bit siginfo_t is 32bit * aligned. Which means that a 64bit field or any other field that * would increase the alignment of siginfo_t will break the ABI.
*/ union __sifields { /* kill() */ struct {
__kernel_pid_t _pid; /* sender's pid */
__kernel_uid32_t _uid; /* sender's uid */
} _kill;
/* POSIX.1b timers */ struct {
__kernel_timer_t _tid; /* timer id */ int _overrun; /* overrun count */
sigval_t _sigval; /* same as below */ int _sys_private; /* Not used by the kernel. Historic leftover. Always 0. */
} _timer;
#define __ADDR_BND_PKEY_PAD (__alignof__(void *) < sizeof(short) ? \ sizeof(short) : __alignof__(void *)) union { /* used on alpha and sparc */ int _trapno; /* TRAP # which caused the signal */ /* * used when si_code=BUS_MCEERR_AR or * used when si_code=BUS_MCEERR_AO
*/ short _addr_lsb; /* LSB of the reported address */ /* used when si_code=SEGV_BNDERR */ struct { char _dummy_bnd[__ADDR_BND_PKEY_PAD]; void __user *_lower; void __user *_upper;
} _addr_bnd; /* used when si_code=SEGV_PKUERR */ struct { char _dummy_pkey[__ADDR_BND_PKEY_PAD];
__u32 _pkey;
} _addr_pkey; /* used when si_code=TRAP_PERF */ struct { unsignedlong _data;
__u32 _type;
__u32 _flags;
} _perf;
};
} _sigfault;
/* * si_code values * Digital reserves positive values for kernel-generated signals.
*/ #define SI_USER 0/* sent by kill, sigsend, raise */ #define SI_KERNEL 0x80 /* sent by the kernel from somewhere */ #define SI_QUEUE -1/* sent by sigqueue */ #define SI_TIMER -2/* sent by timer expiration */ #define SI_MESGQ -3/* sent by real time mesq state change */ #define SI_ASYNCIO -4/* sent by AIO completion */ #define SI_SIGIO -5/* sent by queued SIGIO */ #define SI_TKILL -6/* sent by tkill system call */ #define SI_DETHREAD -7/* sent by execve() killing subsidiary threads */ #define SI_ASYNCNL -60/* sent by glibc async name lookup completion */
/* * SIGBUS si_codes
*/ #define BUS_ADRALN 1/* invalid address alignment */ #define BUS_ADRERR 2/* non-existent physical address */ #define BUS_OBJERR 3/* object specific hardware error */ /* hardware memory error consumed on a machine check: action required */ #define BUS_MCEERR_AR 4 /* hardware memory error detected in process but not consumed: action optional*/ #define BUS_MCEERR_AO 5 #define NSIGBUS 5
/* * SIGTRAP si_codes
*/ #define TRAP_BRKPT 1/* process breakpoint */ #define TRAP_TRACE 2/* process trace trap */ #define TRAP_BRANCH 3/* process taken branch trap */ #define TRAP_HWBKPT 4/* hardware breakpoint/watchpoint */ #define TRAP_UNK 5/* undiagnosed trap */ #define TRAP_PERF 6/* perf event with sigtrap=1 */ #define NSIGTRAP 6
/* * There is an additional set of SIGTRAP si_codes used by ptrace * that are of the form: ((PTRACE_EVENT_XXX << 8) | SIGTRAP)
*/
/* * Flags for si_perf_flags if SIGTRAP si_code is TRAP_PERF.
*/ #define TRAP_PERF_FLAG_ASYNC (1u << 0)
/* * SIGCHLD si_codes
*/ #define CLD_EXITED 1/* child has exited */ #define CLD_KILLED 2/* child was killed */ #define CLD_DUMPED 3/* child terminated abnormally */ #define CLD_TRAPPED 4/* traced child has trapped */ #define CLD_STOPPED 5/* child has stopped */ #define CLD_CONTINUED 6/* stopped child has continued */ #define NSIGCHLD 6
/* * SIGPOLL (or any other signal without signal specific si_codes) si_codes
*/ #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 6/* device disconnected */ #define NSIGPOLL 6
/* * sigevent definitions * * It seems likely that SIGEV_THREAD will have to be handled from * userspace, libpthread transmuting it to SIGEV_SIGNAL, which the * thread manager then catches and does the appropriate nonsense. * However, everything is written out here so as to not get lost.
*/ #define SIGEV_SIGNAL 0/* notify via signal */ #define SIGEV_NONE 1/* other notification: meaningless */ #define SIGEV_THREAD 2/* deliver via thread creation */ #define SIGEV_THREAD_ID 4/* deliver to thread */
/* * This works because the alignment is ok on all current architectures * but we leave open this being overridden in the future
*/ #ifndef __ARCH_SIGEV_PREAMBLE_SIZE #define __ARCH_SIGEV_PREAMBLE_SIZE (sizeof(int) * 2 + sizeof(sigval_t)) #endif
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.