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 add cpu_lock
details: https://anonhg.NetBSD.org/src/rev/edb66acfdbaf
branches: trunk
changeset: 343658:edb66acfdbaf
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Feb 19 18:38:37 2016 +0000
description:
add cpu_lock
from freqlabs on irc
diffstat:
sys/rump/librump/rumpkern/scheduler.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diffs (36 lines):
diff -r bc38685cced8 -r edb66acfdbaf sys/rump/librump/rumpkern/scheduler.c
--- a/sys/rump/librump/rumpkern/scheduler.c Fri Feb 19 17:05:40 2016 +0000
+++ b/sys/rump/librump/rumpkern/scheduler.c Fri Feb 19 18:38:37 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: scheduler.c,v 1.43 2016/02/08 18:18:19 pooka Exp $ */
+/* $NetBSD: scheduler.c,v 1.44 2016/02/19 18:38:37 pooka 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.43 2016/02/08 18:18:19 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scheduler.c,v 1.44 2016/02/19 18:38:37 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -80,6 +80,8 @@
kcpuset_t *kcpuset_running = NULL;
int ncpu, ncpuonline;
+kmutex_t cpu_lock;
+
#define RCPULWP_BUSY ((void *)-1)
#define RCPULWP_WANTED ((void *)-2)
@@ -141,6 +143,8 @@
num = MAXCPUS;
}
+ mutex_init(&cpu_lock, MUTEX_DEFAULT, IPL_NONE);
+
kcpuset_create(&kcpuset_attached, true);
kcpuset_create(&kcpuset_running, true);
Home |
Main Index |
Thread Index |
Old Index