From 9473d5ca6183970c256efe065773dda18e76cac4 Mon Sep 17 00:00:00 2001 From: Nicholas Marriott Date: Mon, 9 Nov 2009 17:53:40 +0000 Subject: Every selwakeup() should have a matching KNOTE() (even if kqueue isn't supported it doesn't do any harm), so put the KNOTE() in selwakeup() itself and remove it from any occurences where both are used, except one for kqueue itself and one in sys_pipe.c (where the selwakeup is under a PIPE_SEL flag). Based on a diff from tedu. ok deraadt --- sys/dev/pci/bktr/bktr_core.c | 9 ++++----- sys/dev/pci/cz.c | 3 +-- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'sys/dev/pci') diff --git a/sys/dev/pci/bktr/bktr_core.c b/sys/dev/pci/bktr/bktr_core.c index a4cde5e1ea9..11c5da0b264 100644 --- a/sys/dev/pci/bktr/bktr_core.c +++ b/sys/dev/pci/bktr/bktr_core.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bktr_core.c,v 1.27 2009/10/31 06:40:17 deraadt Exp $ */ +/* $OpenBSD: bktr_core.c,v 1.28 2009/11/09 17:53:39 nicm Exp $ */ /* $FreeBSD: src/sys/dev/bktr/bktr_core.c,v 1.114 2000/10/31 13:09:56 roger Exp $ */ /* @@ -653,12 +653,11 @@ common_bktr_intr( void *arg ) /* If someone has a select() on /dev/vbi, inform them */ #ifndef __OpenBSD__ if (bktr->vbi_select.si_pid) { -#else - if (bktr->vbi_select.si_selpid) { -#endif selwakeup(&bktr->vbi_select); - KNOTE(&bktr->vbi_select.si_note, 0); } +#else + selwakeup(&bktr->vbi_select); +#endif } diff --git a/sys/dev/pci/cz.c b/sys/dev/pci/cz.c index ae1bb2312eb..0f1377f3e7d 100644 --- a/sys/dev/pci/cz.c +++ b/sys/dev/pci/cz.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cz.c,v 1.14 2009/11/02 00:58:22 fgsch Exp $ */ +/* $OpenBSD: cz.c,v 1.15 2009/11/09 17:53:39 nicm Exp $ */ /* $NetBSD: cz.c,v 1.15 2001/01/20 19:10:36 thorpej Exp $ */ /*- @@ -1486,7 +1486,6 @@ czttystart(struct tty *tp) wakeup(&tp->t_outq); } selwakeup(&tp->t_wsel); - KNOTE(&tp->t_wsel.si_note, 0); if (tp->t_outq.c_cc == 0) goto out; } -- cgit v1.2.3