summaryrefslogtreecommitdiffstats
path: root/sys/sys
diff options
context:
space:
mode:
authorjlemon <jlemon@FreeBSD.org>2000-07-18 19:31:52 +0000
committerjlemon <jlemon@FreeBSD.org>2000-07-18 19:31:52 +0000
commit717104720438689588cc958bf3016b3f7930189b (patch)
tree05255c6232c0c7bad7137781cf031061e43a8d0d /sys/sys
parent613d783c9563e8d6915c7b58a4d9fd84bd83c356 (diff)
downloadFreeBSD-src-717104720438689588cc958bf3016b3f7930189b.zip
FreeBSD-src-717104720438689588cc958bf3016b3f7930189b.tar.gz
Simplify kqueue API slightly.
Discussed on: -arch
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/event.h6
-rw-r--r--sys/sys/eventvar.h9
-rw-r--r--sys/sys/sysproto.h6
3 files changed, 8 insertions, 13 deletions
diff --git a/sys/sys/event.h b/sys/sys/event.h
index 366b347..6182bcc 100644
--- a/sys/sys/event.h
+++ b/sys/sys/event.h
@@ -155,9 +155,9 @@ struct timespec;
__BEGIN_DECLS
int kqueue __P((void));
-int kevent __P((int kq, int nchanges, struct kevent **changelist,
- int nevents, struct kevent *eventlist,
- struct timespec *timeout));
+int kevent __P((int kq, const struct kevent *changelist, int nchanges,
+ struct kevent *eventlist, int nevents,
+ const struct timespec *timeout));
__END_DECLS
#endif /* !_KERNEL */
diff --git a/sys/sys/eventvar.h b/sys/sys/eventvar.h
index 7046f51..3701d44 100644
--- a/sys/sys/eventvar.h
+++ b/sys/sys/eventvar.h
@@ -29,7 +29,7 @@
#ifndef _SYS_EVENTVAR_H_
#define _SYS_EVENTVAR_H_
-#define KQ_NEVENTS 8 /* minimize copyout calls */
+#define KQ_NEVENTS 8 /* minimize copy{in,out} calls */
#define KQEXTENT 256 /* linear growth by this amount */
struct kqueue {
@@ -40,12 +40,7 @@ struct kqueue {
int kq_state;
#define KQ_SEL 0x01
#define KQ_SLEEP 0x02
- union {
- struct kevent *b_kevp[KQ_NEVENTS];
- struct kevent b_kev[KQ_NEVENTS];
- } kq_buf;
-#define kq_kevp kq_buf.b_kevp
-#define kq_kev kq_buf.b_kev
+ struct kevent kq_kev[KQ_NEVENTS];
};
#endif /* !_SYS_EVENTVAR_H_ */
diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h
index 0ead29f..2696e5a 100644
--- a/sys/sys/sysproto.h
+++ b/sys/sys/sysproto.h
@@ -1015,11 +1015,11 @@ struct kqueue_args {
};
struct kevent_args {
int fd; char fd_[PAD_(int)];
+ const struct kevent * changelist; char changelist_[PAD_(const struct kevent *)];
int nchanges; char nchanges_[PAD_(int)];
- struct kevent ** changelist; char changelist_[PAD_(struct kevent **)];
- int nevents; char nevents_[PAD_(int)];
struct kevent * eventlist; char eventlist_[PAD_(struct kevent *)];
- struct timespec * timeout; char timeout_[PAD_(struct timespec *)];
+ int nevents; char nevents_[PAD_(int)];
+ const struct timespec * timeout; char timeout_[PAD_(const struct timespec *)];
};
struct __cap_get_proc_args {
struct cap * cap_p; char cap_p_[PAD_(struct cap *)];
OpenPOWER on IntegriCloud