From bc1805c6e871c178d0b6516c3baa774ffd77224a Mon Sep 17 00:00:00 2001 From: jmg Date: Sun, 15 Aug 2004 06:24:42 +0000 Subject: Add locking to the kqueue subsystem. This also makes the kqueue subsystem a more complete subsystem, and removes the knowlege of how things are implemented from the drivers. Include locking around filter ops, so a module like aio will know when not to be unloaded if there are outstanding knotes using it's filter ops. Currently, it uses the MTX_DUPOK even though it is not always safe to aquire duplicate locks. Witness currently doesn't support the ability to discover if a dup lock is ok (in some cases). Reviewed by: green, rwatson (both earlier versions) --- sys/kern/tty_cons.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/kern/tty_cons.c') diff --git a/sys/kern/tty_cons.c b/sys/kern/tty_cons.c index 54a287c..dd8a115 100644 --- a/sys/kern/tty_cons.c +++ b/sys/kern/tty_cons.c @@ -528,11 +528,11 @@ cnkqfilter(struct cdev *dev, struct knote *kn) cnd = STAILQ_FIRST(&cn_devlist); if (cn_mute || CND_INVALID(cnd, curthread)) - return (1); + return (EINVAL); dev = cnd->cnd_vp->v_rdev; if (dev != NULL) return ((*devsw(dev)->d_kqfilter)(dev, kn)); - return (1); + return (ENXIO); } /* -- cgit v1.1