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 rumpkern:
details: https://anonhg.NetBSD.org/src/rev/38e799d243a7
branches: trunk
changeset: 779839:38e799d243a7
user: rmind <rmind%NetBSD.org@localhost>
date: Fri Jun 22 12:45:43 2012 +0000
description:
rumpkern:
- Add subr_kcpuset.c and subr_pserialize.c modules.
- Add kcpuset_{running,attached} for RUMP env.
diffstat:
sys/rump/librump/rumpkern/Makefile.rumpkern | 4 +++-
sys/rump/librump/rumpkern/rumpcpu_generic.c | 7 +++++--
sys/rump/librump/rumpkern/scheduler.c | 10 ++++++++--
3 files changed, 16 insertions(+), 5 deletions(-)
diffs (88 lines):
diff -r 47e2d103bc0f -r 38e799d243a7 sys/rump/librump/rumpkern/Makefile.rumpkern
--- a/sys/rump/librump/rumpkern/Makefile.rumpkern Fri Jun 22 11:03:57 2012 +0000
+++ b/sys/rump/librump/rumpkern/Makefile.rumpkern Fri Jun 22 12:45:43 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.rumpkern,v 1.117 2012/04/29 02:29:41 rmind Exp $
+# $NetBSD: Makefile.rumpkern,v 1.118 2012/06/22 12:45:43 rmind Exp $
#
.include "${RUMPTOP}/Makefile.rump"
@@ -91,11 +91,13 @@
subr_hash.c \
subr_humanize.c \
subr_iostat.c \
+ subr_kcpuset.c \
subr_kobj.c \
subr_log.c \
subr_lwp_specificdata.c \
subr_once.c \
subr_prf.c \
+ subr_pserialize.c \
subr_specificdata.c \
subr_time.c \
subr_workqueue.c \
diff -r 47e2d103bc0f -r 38e799d243a7 sys/rump/librump/rumpkern/rumpcpu_generic.c
--- a/sys/rump/librump/rumpkern/rumpcpu_generic.c Fri Jun 22 11:03:57 2012 +0000
+++ b/sys/rump/librump/rumpkern/rumpcpu_generic.c Fri Jun 22 12:45:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpcpu_generic.c,v 1.3 2011/01/04 16:23:36 pooka Exp $ */
+/* $NetBSD: rumpcpu_generic.c,v 1.4 2012/06/22 12:45:43 rmind Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -29,7 +29,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rumpcpu_generic.c,v 1.3 2011/01/04 16:23:36 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rumpcpu_generic.c,v 1.4 2012/06/22 12:45:43 rmind Exp $");
#include <sys/param.h>
@@ -47,4 +47,7 @@
rumpcpu_info_list = ci;
ci->ci_index = nattached++;
+
+ kcpuset_set(kcpuset_attached, cpu_index(ci));
+ kcpuset_set(kcpuset_running, cpu_index(ci));
}
diff -r 47e2d103bc0f -r 38e799d243a7 sys/rump/librump/rumpkern/scheduler.c
--- a/sys/rump/librump/rumpkern/scheduler.c Fri Jun 22 11:03:57 2012 +0000
+++ b/sys/rump/librump/rumpkern/scheduler.c Fri Jun 22 12:45:43 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scheduler.c,v 1.27 2011/10/31 13:17:22 yamt Exp $ */
+/* $NetBSD: scheduler.c,v 1.28 2012/06/22 12:45:43 rmind Exp $ */
/*
* Copyright (c) 2010, 2011 Antti Kantee. All Rights Reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.27 2011/10/31 13:17:22 yamt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.28 2012/06/22 12:45:43 rmind Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -68,7 +68,10 @@
int rcpu_align[0] __aligned(CACHE_LINE_SIZE);
} rcpu_storage[MAXCPUS];
+
struct cpu_info *rump_cpu = &rump_cpus[0];
+kcpuset_t *kcpuset_attached = NULL;
+kcpuset_t *kcpuset_running = NULL;
int ncpu;
#define RCPULWP_BUSY ((void *)-1)
@@ -141,6 +144,9 @@
ci->ci_index = i;
}
+ kcpuset_create(&kcpuset_attached, true);
+ kcpuset_create(&kcpuset_running, true);
+
/* attach first cpu for bootstrap */
rump_cpu_attach(&rump_cpus[0]);
ncpu = 1;
Home |
Main Index |
Thread Index |
Old Index