diff options
author | alc <alc@FreeBSD.org> | 2000-11-21 19:36:36 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 2000-11-21 19:36:36 +0000 |
commit | dfa19cb0cec51bbb1fba802ceae5f4b58cad3892 (patch) | |
tree | f94c70c4fa02e59eaa647c43646fa01b3f50e088 /sys/sys/_sigset.h | |
parent | e4af8551d901ed0a27dbc1149b09d6ce974fd1ae (diff) | |
download | FreeBSD-src-dfa19cb0cec51bbb1fba802ceae5f4b58cad3892.zip FreeBSD-src-dfa19cb0cec51bbb1fba802ceae5f4b58cad3892.tar.gz |
Provide a new interface for the user of aio_read() and aio_write() to request
a kevent upon completion of the I/O. Specifically, introduce a new type
of sigevent notification, SIGEV_EVENT. If sigev_notify is SIGEV_EVENT,
then sigev_notify_kqueue names the kqueue that should receive the event
and sigev_value contains the "void *" is copied into the kevent's udata
field.
In contrast to the existing interface, this one: 1) works on
the Alpha 2) avoids the extra copyin() call for the kevent because all
of the information needed is in the sigevent and 3) could be
applied to request a single kevent upon completion of an entire lio_listio().
Reviewed by: jlemon
Diffstat (limited to 'sys/sys/_sigset.h')
-rw-r--r-- | sys/sys/_sigset.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sys/sys/_sigset.h b/sys/sys/_sigset.h index e3bef90..95891ff 100644 --- a/sys/sys/_sigset.h +++ b/sys/sys/_sigset.h @@ -133,12 +133,18 @@ union sigval { struct sigevent { int sigev_notify; /* Notification type */ - int sigev_signo; /* Signal number */ + union { + int __sigev_signo; /* Signal number */ + int __sigev_notify_kqueue; + } __sigev_u; union sigval sigev_value; /* Signal value */ }; +#define sigev_signo __sigev_u.__sigev_signo +#define sigev_notify_kqueue __sigev_u.__sigev_notify_kqueue #define SIGEV_NONE 0 /* No async notification */ #define SIGEV_SIGNAL 1 /* Generate a queued signal */ +#define SIGEV_KEVENT 3 /* Generate a kevent */ typedef struct __siginfo { int si_signo; /* signal number */ |