aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/signal.h
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2005-10-30 02:12:49 +0000
committerDavid Xu <davidxu@FreeBSD.org>2005-10-30 02:12:49 +0000
commit0972628affc6f7cfab5b9fbc6d6ec09a11d2b56b (patch)
tree09f966509a2a1a97712bab71d4b04e8aa24b07e2 /sys/sys/signal.h
parent70293cc76a62f0fb2a95b16f2f4320474fd1595e (diff)
downloadsrc-0972628affc6f7cfab5b9fbc6d6ec09a11d2b56b.tar.gz
src-0972628affc6f7cfab5b9fbc6d6ec09a11d2b56b.zip
Fix sigevent's POSIX incompatible problem by adding member fields
sigev_notify_function and sigev_notify_attributes. AIO syscalls use sigevent, so they have to be adjusted. Reviewed by: alc
Notes
Notes: svn path=/head/; revision=151867
Diffstat (limited to 'sys/sys/signal.h')
-rw-r--r--sys/sys/signal.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/sys/sys/signal.h b/sys/sys/signal.h
index 7e273e30dd50..d6dc895e71da 100644
--- a/sys/sys/signal.h
+++ b/sys/sys/signal.h
@@ -158,28 +158,31 @@ union sigval {
#if __POSIX_VISIBLE >= 199309
struct sigevent {
int sigev_notify; /* Notification type */
- union {
- int __sigev_signo; /* Signal number */
- int __sigev_notify_kqueue;
- } __sigev_u;
+ int sigev_signo; /* Signal number */
union sigval sigev_value; /* Signal value */
-/*
- * XXX missing sigev_notify_function, sigev_notify_attributes.
- */
+ union {
+ __lwpid_t _threadid;
+ struct {
+ void (*_function)(union sigval *);
+ void *_attribute; /* pthread_attr_t * */
+ } _sigev_thread;
+ } _sigev_un;
};
-#define sigev_signo __sigev_u.__sigev_signo
+
#if __BSD_VISIBLE
-#define sigev_notify_kqueue __sigev_u.__sigev_notify_kqueue
+#define sigev_notify_kqueue sigev_signo
+#define sigev_notify_thread_id _sigev_un._threadid
#endif
+#define sigev_notify_function _sigev_un._sigev_thread._function
+#define sigev_notify_attributes _sigev_un._sigev_thread._attribute
-#define SIGEV_NONE 0 /* No async notification */
-#define SIGEV_SIGNAL 1 /* Generate a queued signal */
+#define SIGEV_NONE 0 /* No async notification. */
+#define SIGEV_SIGNAL 1 /* Generate a queued signal. */
+#define SIGEV_THREAD 2 /* Call back from another pthread. */
#if __BSD_VISIBLE
-#define SIGEV_KEVENT 3 /* Generate a kevent */
+#define SIGEV_KEVENT 3 /* Generate a kevent. */
+#define SIGEV_THREAD_ID 4 /* Send signal to a kernel thread. */
#endif
-/*
- * XXX missing SIGEV_THREAD.
- */
#endif /* __POSIX_VISIBLE >= 199309 */
#if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE