Module Name: src Committed By: pooka Date: Thu Jun 3 19:36:21 UTC 2010
Modified Files: src/sys/rump/librump/rumpkern: memalloc.c threads.c Log Message: Don't use rumpuser_malloc() directly. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/rump/librump/rumpkern/memalloc.c cvs rdiff -u -r1.10 -r1.11 src/sys/rump/librump/rumpkern/threads.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/memalloc.c diff -u src/sys/rump/librump/rumpkern/memalloc.c:1.7 src/sys/rump/librump/rumpkern/memalloc.c:1.8 --- src/sys/rump/librump/rumpkern/memalloc.c:1.7 Thu Jun 3 10:56:20 2010 +++ src/sys/rump/librump/rumpkern/memalloc.c Thu Jun 3 19:36:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: memalloc.c,v 1.7 2010/06/03 10:56:20 pooka Exp $ */ +/* $NetBSD: memalloc.c,v 1.8 2010/06/03 19:36:21 pooka Exp $ */ /* * Copyright (c) 2009 Antti Kantee. All Rights Reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: memalloc.c,v 1.7 2010/06/03 10:56:20 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: memalloc.c,v 1.8 2010/06/03 19:36:21 pooka Exp $"); #include <sys/param.h> #include <sys/kmem.h> @@ -171,7 +171,7 @@ { pool_cache_t pc; - pc = rumpuser_malloc(sizeof(*pc), 0); + pc = rump_hypermalloc(sizeof(*pc), 0, true, "pcinit"); pool_cache_bootstrap(pc, size, align, align_offset, flags, wchan, palloc, ipl, ctor, dtor, arg); return pc; Index: src/sys/rump/librump/rumpkern/threads.c diff -u src/sys/rump/librump/rumpkern/threads.c:1.10 src/sys/rump/librump/rumpkern/threads.c:1.11 --- src/sys/rump/librump/rumpkern/threads.c:1.10 Mon May 31 23:09:29 2010 +++ src/sys/rump/librump/rumpkern/threads.c Thu Jun 3 19:36:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: threads.c,v 1.10 2010/05/31 23:09:29 pooka Exp $ */ +/* $NetBSD: threads.c,v 1.11 2010/06/03 19:36:21 pooka Exp $ */ /* * Copyright (c) 2007-2009 Antti Kantee. All Rights Reserved. @@ -29,12 +29,13 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.10 2010/05/31 23:09:29 pooka Exp $"); +__KERNEL_RCSID(0, "$NetBSD: threads.c,v 1.11 2010/06/03 19:36:21 pooka Exp $"); #include <sys/param.h> #include <sys/atomic.h> #include <sys/kmem.h> #include <sys/kthread.h> +#include <sys/malloc.h> #include <sys/systm.h> #include <machine/stdarg.h> @@ -59,12 +60,14 @@ f = k->f; thrarg = k->arg; - rumpuser_free(k); /* schedule ourselves */ rumpuser_set_curlwp(l); rump_schedule(); + /* free dance struct */ + free(k, M_TEMP); + if ((curlwp->l_pflag & LP_MPSAFE) == 0) KERNEL_LOCK(1, NULL); @@ -133,7 +136,7 @@ } KASSERT(fmt != NULL); - k = rumpuser_malloc(sizeof(struct kthdesc), 0); + k = malloc(sizeof(*k), M_TEMP, M_WAITOK); k->f = func; k->arg = arg; k->mylwp = l = rump_lwp_alloc(0, rump_nextlid());