Source-Changes-HG archive

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

[src/trunk]: src/sys/rump/librump/rumpkern Fill in a functional struct lwp (e...



details:   https://anonhg.NetBSD.org/src/rev/4ea66b8277e6
branches:  trunk
changeset: 763000:4ea66b8277e6
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Mar 07 21:04:47 2011 +0000

description:
Fill in a functional struct lwp (especially l_mutex) before exposing
it on p_lwps.

diffstat:

 sys/rump/librump/rumpkern/lwproc.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r a65831f820e3 -r 4ea66b8277e6 sys/rump/librump/rumpkern/lwproc.c
--- a/sys/rump/librump/rumpkern/lwproc.c        Mon Mar 07 19:27:27 2011 +0000
+++ b/sys/rump/librump/rumpkern/lwproc.c        Mon Mar 07 21:04:47 2011 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: lwproc.c,v 1.15 2011/02/10 13:40:35 pooka Exp $       */
+/*      $NetBSD: lwproc.c,v 1.16 2011/03/07 21:04:47 pooka Exp $       */
 
 /*
  * Copyright (c) 2010, 2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.15 2011/02/10 13:40:35 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: lwproc.c,v 1.16 2011/03/07 21:04:47 pooka Exp $");
 
 #include <sys/param.h>
 #include <sys/atomic.h>
@@ -229,9 +229,6 @@
 
        l->l_lid = p->p_nlwpid++;
        LIST_INSERT_HEAD(&p->p_lwps, l, l_sibling);
-       mutex_exit(p->p_lock);
-
-       lwp_update_creds(l);
 
        l->l_fd = p->p_fd;
        l->l_cpu = rump_cpu;
@@ -239,7 +236,9 @@
        l->l_stat = LSRUN;
        l->l_mutex = &unruntime_lock;
        TAILQ_INIT(&l->l_ld_locks);
+       mutex_exit(p->p_lock);
 
+       lwp_update_creds(l);
        lwp_initspecific(l);
 
        if (doswitch) {



Home | Main Index | Thread Index | Old Index