Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/usermode/dev make room for a small msgbuf
details: https://anonhg.NetBSD.org/src/rev/1257c8544e0f
branches: trunk
changeset: 768682:1257c8544e0f
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Wed Aug 24 19:55:35 2011 +0000
description:
make room for a small msgbuf
diffstat:
sys/arch/usermode/dev/cpu.c | 12 ++++++++++--
1 files changed, 10 insertions(+), 2 deletions(-)
diffs (47 lines):
diff -r 2992dd528137 -r 1257c8544e0f sys/arch/usermode/dev/cpu.c
--- a/sys/arch/usermode/dev/cpu.c Wed Aug 24 19:42:52 2011 +0000
+++ b/sys/arch/usermode/dev/cpu.c Wed Aug 24 19:55:35 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu.c,v 1.15 2011/08/13 14:06:54 jmcneill Exp $ */
+/* $NetBSD: cpu.c,v 1.16 2011/08/24 19:55:35 jmcneill Exp $ */
/*-
* Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.15 2011/08/13 14:06:54 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.16 2011/08/24 19:55:35 jmcneill Exp $");
#include <sys/param.h>
#include <sys/conf.h>
@@ -38,6 +38,7 @@
#include <sys/lwp.h>
#include <sys/cpu.h>
#include <sys/mbuf.h>
+#include <sys/msgbuf.h>
#include <dev/cons.h>
@@ -69,6 +70,7 @@
} cpu_softc_t;
static struct pcb lwp0pcb;
+static void *msgbuf;
CFATTACH_DECL_NEW(cpu, sizeof(cpu_softc_t), cpu_match, cpu_attach, NULL, NULL);
@@ -311,6 +313,12 @@
void
cpu_startup(void)
{
+
+ msgbuf = thunk_malloc(PAGE_SIZE);
+ if (msgbuf == NULL)
+ panic("couldn't allocate msgbuf");
+ initmsgbuf(msgbuf, PAGE_SIZE);
+
banner();
memset(&lwp0pcb, 0, sizeof(lwp0pcb));
Home |
Main Index |
Thread Index |
Old Index