From 4561007102a392b18319fdcebd8487f88e1f3e00 Mon Sep 17 00:00:00 2001 From: Matthew Dillon Date: Sat, 25 Mar 2006 18:32:35 +0000 Subject: [PATCH] Undo the last commit. At the moment we require access to the structure to be serialized, and a great deal more work is required (not just a critical section) to make it MP safe. That is why there is an assertion there instead of a critical section. --- sys/kern/kern_event.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/sys/kern/kern_event.c b/sys/kern/kern_event.c index 0226a469ca..d0353ab52c 100644 --- a/sys/kern/kern_event.c +++ b/sys/kern/kern_event.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/kern_event.c,v 1.2.2.10 2004/04/04 07:03:14 cperciva Exp $ - * $DragonFly: src/sys/kern/kern_event.c,v 1.19 2006/03/23 20:48:09 drhodus Exp $ + * $DragonFly: src/sys/kern/kern_event.c,v 1.20 2006/03/25 18:32:35 dillon Exp $ */ #include @@ -951,11 +951,8 @@ knote_enqueue(struct knote *kn) struct kqueue *kq = kn->kn_kq; crit_enter(); + KASSERT((kn->kn_status & KN_QUEUED) == 0, ("knote already queued")); - if (kn->kn_status & KN_QUEUED) { - crit_exit(); - return; - } TAILQ_INSERT_TAIL(&kq->kq_head, kn, kn_tqe); kn->kn_status |= KN_QUEUED; kq->kq_count++; -- 2.11.4.GIT