callout_barrier: drop kernel_lock before blocking.

This commit is contained in:
ad 2007-07-30 21:36:54 +00:00
parent c723e7a07c
commit 00348ca253
1 changed files with 3 additions and 4 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: kern_timeout.c,v 1.24 2007/07/10 21:26:00 ad Exp $ */
/* $NetBSD: kern_timeout.c,v 1.25 2007/07/30 21:36:54 ad Exp $ */
/*-
* Copyright (c) 2003, 2006, 2007 The NetBSD Foundation, Inc.
@ -66,7 +66,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.24 2007/07/10 21:26:00 ad Exp $");
__KERNEL_RCSID(0, "$NetBSD: kern_timeout.c,v 1.25 2007/07/30 21:36:54 ad Exp $");
/*
* Timeouts are kept in a hierarchical timing wheel. The c_time is the
@ -218,8 +218,7 @@ callout_barrier(callout_impl_t *c)
ci->ci_data.cpu_callout_nwait++;
callout_ev_block.ev_count++;
lwp_lock(l);
lwp_unlock_to(l, &callout_lock);
sleepq_enter(&callout_sleepq, l);
sleepq_enqueue(&callout_sleepq, sched_kpri(l), ci,
"callout", &sleep_syncobj);
sleepq_block(0, false);