From a416e412112496e423799429cd571222df89c4be Mon Sep 17 00:00:00 2001 From: rmind Date: Wed, 10 Oct 2007 22:21:17 +0000 Subject: [PATCH] sched_catchlwp: Estimate the pointers of CPU structures, not spc_mutex'es, when double-locking the runqueues. --- sys/kern/sched_m2.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/kern/sched_m2.c b/sys/kern/sched_m2.c index 1194619181e6..5ee9422d08e0 100644 --- a/sys/kern/sched_m2.c +++ b/sys/kern/sched_m2.c @@ -1,4 +1,4 @@ -/* $NetBSD: sched_m2.c,v 1.2 2007/10/10 21:24:53 rmind Exp $ */ +/* $NetBSD: sched_m2.c,v 1.3 2007/10/10 22:21:17 rmind Exp $ */ /* * Copyright (c) 2007, Mindaugas Rasiukevicius @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sched_m2.c,v 1.2 2007/10/10 21:24:53 rmind Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sched_m2.c,v 1.3 2007/10/10 22:21:17 rmind Exp $"); #include @@ -632,7 +632,7 @@ sched_catchlwp(void) /* * Double-lock the runqueues. */ - if (curci->ci_schedstate.spc_mutex < ci->ci_schedstate.spc_mutex) { + if (curci < ci) { spc_lock(ci); } else if (!mutex_tryenter(ci->ci_schedstate.spc_mutex)) { const runqueue_t *cur_rq = curci->ci_schedstate.spc_sched_info;