From 42bc09155e3b85e9c7c7dda3992b05095385a452 Mon Sep 17 00:00:00 2001 From: ad Date: Wed, 2 Apr 2008 17:38:16 +0000 Subject: [PATCH] yield: don't drop priority to zero. libpthread doesn't make much use of this any more but applications do and it now pessimizes benchmarks. --- sys/kern/kern_synch.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/sys/kern/kern_synch.c b/sys/kern/kern_synch.c index c035c2a85580..1cd801fc14ff 100644 --- a/sys/kern/kern_synch.c +++ b/sys/kern/kern_synch.c @@ -1,4 +1,4 @@ -/* $NetBSD: kern_synch.c,v 1.221 2008/03/17 16:54:51 ad Exp $ */ +/* $NetBSD: kern_synch.c,v 1.222 2008/04/02 17:38:16 ad Exp $ */ /*- * Copyright (c) 1999, 2000, 2004, 2006, 2007, 2008 The NetBSD Foundation, Inc. @@ -75,7 +75,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.221 2008/03/17 16:54:51 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: kern_synch.c,v 1.222 2008/04/02 17:38:16 ad Exp $"); #include "opt_kstack.h" #include "opt_lockdebug.h" @@ -298,13 +298,6 @@ yield(void) KASSERT(lwp_locked(l, l->l_cpu->ci_schedstate.spc_lwplock)); KASSERT(l->l_stat == LSONPROC); l->l_kpriority = false; - if (l->l_class == SCHED_OTHER) { - /* - * Only for timeshared threads. It will be reset - * by the scheduler in due course. - */ - l->l_priority = 0; - } (void)mi_switch(l); KERNEL_LOCK(l->l_biglocks, l); }