Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/compat/mach protect p_nrlwps by sched_lock.



details:   https://anonhg.NetBSD.org/src/rev/ed058217b2da
branches:  trunk
changeset: 584436:ed058217b2da
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Sep 17 14:35:51 2005 +0000

description:
protect p_nrlwps by sched_lock.

diffstat:

 sys/compat/mach/mach_thread.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 1e1cff8b21cb -r ed058217b2da sys/compat/mach/mach_thread.c
--- a/sys/compat/mach/mach_thread.c     Sat Sep 17 12:40:27 2005 +0000
+++ b/sys/compat/mach/mach_thread.c     Sat Sep 17 14:35:51 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mach_thread.c,v 1.34 2005/02/26 23:10:20 perry Exp $ */
+/*     $NetBSD: mach_thread.c,v 1.35 2005/09/17 14:35:51 yamt Exp $ */
 
 /*-
  * Copyright (c) 2002-2003 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mach_thread.c,v 1.34 2005/02/26 23:10:20 perry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mach_thread.c,v 1.35 2005/09/17 14:35:51 yamt Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -232,10 +232,8 @@
        mctc.mctc_lwp->l_private = 0;
        mctc.mctc_lwp->l_stat = LSRUN;
        setrunqueue(mctc.mctc_lwp);
+       p->p_nrlwps++;
        SCHED_UNLOCK(s);
-       simple_lock(&p->p_lock);
-       p->p_nrlwps++;
-       simple_unlock(&p->p_lock);
 
        /*
         * Get the child's kernel port



Home | Main Index | Thread Index | Old Index