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 Do lwp0 initialisation as early as...
details: https://anonhg.NetBSD.org/src/rev/de8dc247b52e
branches: trunk
changeset: 791443:de8dc247b52e
user: njoly <njoly%NetBSD.org@localhost>
date: Mon Nov 18 18:45:29 2013 +0000
description:
Do lwp0 initialisation as early as possible, right after
rumpuser_init(). This makes rump applications work again when
RUMP_LOCKDEBUG is enabled.
ok pooka.
diffstat:
sys/rump/librump/rumpkern/rump.c | 24 ++++++++++++------------
1 files changed, 12 insertions(+), 12 deletions(-)
diffs (52 lines):
diff -r 801f0433f00e -r de8dc247b52e sys/rump/librump/rumpkern/rump.c
--- a/sys/rump/librump/rumpkern/rump.c Mon Nov 18 18:17:19 2013 +0000
+++ b/sys/rump/librump/rumpkern/rump.c Mon Nov 18 18:45:29 2013 +0000
@@ -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 @@
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_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);
Home |
Main Index |
Thread Index |
Old Index