Module Name:    src
Committed By:   njoly
Date:           Mon Nov 18 18:45:29 UTC 2013

Modified Files:
        src/sys/rump/librump/rumpkern: rump.c

Log Message:
Do lwp0 initialisation as early as possible, right after
rumpuser_init(). This makes rump applications work again when
RUMP_LOCKDEBUG is enabled.

ok pooka.


To generate a diff of this commit:
cvs rdiff -u -r1.275 -r1.276 src/sys/rump/librump/rumpkern/rump.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/rump/librump/rumpkern/rump.c
diff -u src/sys/rump/librump/rumpkern/rump.c:1.275 src/sys/rump/librump/rumpkern/rump.c:1.276
--- src/sys/rump/librump/rumpkern/rump.c:1.275	Mon Sep  9 19:18:08 2013
+++ src/sys/rump/librump/rumpkern/rump.c	Mon Nov 18 18:45:29 2013
@@ -1,4 +1,4 @@
-/*	$NetBSD: rump.c,v 1.275 2013/09/09 19:18:08 pooka Exp $	*/
+/*	$NetBSD: rump.c,v 1.276 2013/11/18 18:45:29 njoly Exp $	*/
 
 /*
  * Copyright (c) 2007-2011 Antti Kantee.  All Rights Reserved.
@@ -26,7 +26,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.275 2013/09/09 19:18:08 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rump.c,v 1.276 2013/11/18 18:45:29 njoly Exp $");
 
 #include <sys/systm.h>
 #define ELFSIZE ARCH_ELFSIZE
@@ -268,6 +268,16 @@ rump_init(void)
 		return EINVAL;
 	}
 
+	/* init minimal lwp/cpu context */
+	l = &lwp0;
+	l->l_lid = 1;
+	l->l_cpu = l->l_target_cpu = rump_cpu;
+	l->l_fd = &filedesc0;
+
+	/* lwp0 isn't created like other threads, so notify hypervisor here */
+	rumpuser_curlwpop(RUMPUSER_LWP_CREATE, l);
+	rumpuser_curlwpop(RUMPUSER_LWP_SET, l);
+
 	/* retrieve env vars which affect the early stage of bootstrap */
 	if (rumpuser_getparam("RUMP_THREADS", buf, sizeof(buf)) == 0) {
 		rump_threads = *buf != '0';
@@ -297,16 +307,6 @@ rump_init(void)
 
 	rump_intr_init(numcpu);
 
-	/* init minimal lwp/cpu context */
-	l = &lwp0;
-	l->l_lid = 1;
-	l->l_cpu = l->l_target_cpu = rump_cpu;
-	l->l_fd = &filedesc0;
-
-	/* lwp0 isn't created like other threads, so notify hypervisor here */
-	rumpuser_curlwpop(RUMPUSER_LWP_CREATE, l);
-	rumpuser_curlwpop(RUMPUSER_LWP_SET, l);
-
 	rump_tsleep_init();
 
 	rumpuser_mutex_init(&rump_giantlock, RUMPUSER_MTX_SPIN);

Reply via email to