From 1a2d6e30c869789401fa7a579d359015a7fc952f Mon Sep 17 00:00:00 2001 From: David Xu Date: Tue, 6 Dec 2005 06:02:35 +0000 Subject: o Add some pad fields into struct sigevent for future extension. (suggested by alfred@) o Reuse si_band field in struct __siginfo, add a mqd member which will be used by mqueue. o Add code SI_KERNEL to indicate a signal is queued by kernel. --- sys/sys/signal.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'sys/sys') diff --git a/sys/sys/signal.h b/sys/sys/signal.h index 8690477b6bc8..f78f41f97643 100644 --- a/sys/sys/signal.h +++ b/sys/sys/signal.h @@ -167,6 +167,7 @@ struct sigevent { void (*_function)(union sigval); void *_attribute; /* pthread_attr_t * */ } _sigev_thread; + long __spare__[8]; } _sigev_un; }; @@ -202,7 +203,6 @@ typedef struct __siginfo { int si_status; /* exit value */ void *si_addr; /* faulting instruction */ union sigval si_value; /* signal value */ - long si_band; /* band event for SIGPOLL */ union { struct { int _trapno;/* machine specific trap code */ @@ -211,13 +211,24 @@ typedef struct __siginfo { int _timerid; int _overrun; } _timer; - int __spare__[7]; /* gimme some slack */ + struct { + int _mqd; + } _mesgq; + struct { + long _band; /* band event for SIGPOLL */ + } _poll; /* was this ever used ? */ + struct { + long __spare1__; + int __spare2__[7]; + } __spare__; } _reason; } siginfo_t; #define si_trapno _reason._fault._trapno #define si_timerid _reason._timer._timerid #define si_overrun _reason._timer._overrun +#define si_mqd _reason._mesgq._mqd +#define si_band _reason._poll._band /** si_code **/ /* codes for SIGILL */ @@ -323,6 +334,7 @@ struct sigaction { /* an asynchronous I/O request.*/ #define SI_MESGQ 0x10005 /* Signal generated by arrival of a */ /* message on an empty message queue. */ +#define SI_KERNEL 0x10006 /* Normal signal is sent by kernel. */ #endif #if __BSD_VISIBLE #define SI_UNDEFINED 0 -- cgit v1.2.3