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 Always include subr_vmem.c, even w...
details: https://anonhg.NetBSD.org/src/rev/7e51c71498f0
branches: trunk
changeset: 785351:7e51c71498f0
user: pooka <pooka%NetBSD.org@localhost>
date: Sun Mar 10 16:27:11 2013 +0000
description:
Always include subr_vmem.c, even with RUMP_UNREAL_ALLOCATORS=yes
(previously it was just missing in that case).
Record wchan to unreal pool_init() to avoid memory leak warning.
diffstat:
sys/rump/librump/rumpkern/Makefile.rumpkern | 6 +-
sys/rump/librump/rumpkern/memalloc.c | 71 +---------------------------
2 files changed, 7 insertions(+), 70 deletions(-)
diffs (133 lines):
diff -r 4cf6f2862e76 -r 7e51c71498f0 sys/rump/librump/rumpkern/Makefile.rumpkern
--- a/sys/rump/librump/rumpkern/Makefile.rumpkern Sun Mar 10 14:15:54 2013 +0000
+++ b/sys/rump/librump/rumpkern/Makefile.rumpkern Sun Mar 10 16:27:11 2013 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rumpkern,v 1.121 2012/12/30 23:52:12 pooka Exp $
+# $NetBSD: Makefile.rumpkern,v 1.122 2013/03/10 16:27:11 pooka Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@@ -97,10 +97,12 @@
subr_log.c \
subr_lwp_specificdata.c \
subr_once.c \
+ subr_percpu.c \
subr_prf.c \
subr_pserialize.c \
subr_specificdata.c \
subr_time.c \
+ subr_vmem.c \
subr_workqueue.c \
subr_xcall.c \
sys_descrip.c \
@@ -137,7 +139,7 @@
.if defined(RUMP_UNREAL_ALLOCATORS) && ${RUMP_UNREAL_ALLOCATORS} == "yes"
CPPFLAGS+= -DRUMP_UNREAL_ALLOCATORS
.else
-SRCS+= subr_kmem.c subr_percpu.c subr_pool.c subr_vmem.c
+SRCS+= subr_kmem.c subr_pool.c
.endif
.ifdef RUMP_LOCKDEBUG
diff -r 4cf6f2862e76 -r 7e51c71498f0 sys/rump/librump/rumpkern/memalloc.c
--- a/sys/rump/librump/rumpkern/memalloc.c Sun Mar 10 14:15:54 2013 +0000
+++ b/sys/rump/librump/rumpkern/memalloc.c Sun Mar 10 16:27:11 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: memalloc.c,v 1.18 2012/07/20 09:20:05 pooka Exp $ */
+/* $NetBSD: memalloc.c,v 1.19 2013/03/10 16:27:11 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -26,14 +26,12 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: memalloc.c,v 1.18 2012/07/20 09:20:05 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: memalloc.c,v 1.19 2013/03/10 16:27:11 pooka Exp $");
#include <sys/param.h>
#include <sys/kmem.h>
#include <sys/malloc.h>
-#include <sys/percpu.h>
#include <sys/pool.h>
-#include <sys/vmem.h>
#include <rump/rumpuser.h>
@@ -148,6 +146,7 @@
pp->pr_size = size;
pp->pr_align = align;
+ pp->pr_wchan = wchan;
}
void
@@ -327,68 +326,4 @@
.pa_pagesz = 0
};
-void
-vmem_rehash_start()
-{
-
- return;
-}
-
-/*
- * A simplified percpu is included in here since subr_percpu.c uses
- * the vmem allocator and I don't want to reimplement vmem. So use
- * this simplified percpu for non-vmem systems.
- */
-
-static kmutex_t pcmtx;
-
-void
-percpu_init(void)
-{
-
- mutex_init(&pcmtx, MUTEX_DEFAULT, IPL_NONE);
-}
-
-void
-percpu_init_cpu(struct cpu_info *ci)
-{
-
- /* nada */
-}
-
-void *
-percpu_getref(percpu_t *pc)
-{
-
- mutex_enter(&pcmtx);
- return pc;
-}
-
-void
-percpu_putref(percpu_t *pc)
-{
-
- mutex_exit(&pcmtx);
-}
-
-percpu_t *
-percpu_alloc(size_t size)
-{
-
- return kmem_alloc(size, KM_SLEEP);
-}
-
-void
-percpu_free(percpu_t *pc, size_t size)
-{
-
- kmem_free(pc, size);
-}
-
-void
-percpu_foreach(percpu_t *pc, percpu_callback_t cb, void *arg)
-{
-
- cb(pc, arg, rump_cpu);
-}
#endif /* RUMP_UNREAL_ALLOCATORS */
Home |
Main Index |
Thread Index |
Old Index