aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2005-12-06 06:02:35 +0000
committerDavid Xu <davidxu@FreeBSD.org>2005-12-06 06:02:35 +0000
commit1a2d6e30c869789401fa7a579d359015a7fc952f (patch)
tree3424909c3c4f697a2af3782ea3630d6989aedc45
parent027f7604086f22c54930f2d3354cabefa72573a5 (diff)
downloadsrc-1a2d6e30c869789401fa7a579d359015a7fc952f.tar.gz
src-1a2d6e30c869789401fa7a579d359015a7fc952f.zip
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.
Notes
Notes: svn path=/head/; revision=153154
-rw-r--r--sys/sys/signal.h16
1 files changed, 14 insertions, 2 deletions
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