Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/librumpuser Give private hypercalls the ability to meddl...
details: https://anonhg.NetBSD.org/src/rev/52801486ec9c
branches: trunk
changeset: 786481:52801486ec9c
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Apr 29 15:20:05 2013 +0000
description:
Give private hypercalls the ability to meddle with kthread contexts too.
diffstat:
lib/librumpuser/rumpuser_component.c | 43 ++++++++++++++++++++++++++++++++++-
lib/librumpuser/rumpuser_component.h | 7 +++++-
2 files changed, 47 insertions(+), 3 deletions(-)
diffs (80 lines):
diff -r c37d0597e318 -r 52801486ec9c lib/librumpuser/rumpuser_component.c
--- a/lib/librumpuser/rumpuser_component.c Mon Apr 29 15:05:35 2013 +0000
+++ b/lib/librumpuser/rumpuser_component.c Mon Apr 29 15:20:05 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser_component.c,v 1.3 2013/04/29 14:51:39 pooka Exp $ */
+/* $NetBSD: rumpuser_component.c,v 1.4 2013/04/29 15:20:05 pooka Exp $ */
/*
* Copyright (c) 2013 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
#include "rumpuser_port.h"
#if !defined(lint)
-__RCSID("$NetBSD: rumpuser_component.c,v 1.3 2013/04/29 14:51:39 pooka Exp $");
+__RCSID("$NetBSD: rumpuser_component.c,v 1.4 2013/04/29 15:20:05 pooka Exp $");
#endif /* !lint */
/*
@@ -58,3 +58,42 @@
rumpkern_sched(nlocks, NULL);
}
+
+void
+rumpuser_component_kthread(void)
+{
+
+ rumpuser__hyp.hyp_schedule();
+ rumpuser__hyp.hyp_lwproc_newlwp(0);
+ rumpuser__hyp.hyp_unschedule();
+}
+
+struct lwp *
+rumpuser_component_curlwp(void)
+{
+ struct lwp *l;
+
+ rumpuser__hyp.hyp_schedule();
+ l = rumpuser__hyp.hyp_lwproc_curlwp();
+ rumpuser__hyp.hyp_unschedule();
+
+ return l;
+}
+
+void
+rumpuser_component_switchlwp(struct lwp *l)
+{
+
+ rumpuser__hyp.hyp_schedule();
+ rumpuser__hyp.hyp_lwproc_switch(l);
+ rumpuser__hyp.hyp_unschedule();
+}
+
+void
+rumpuser_component_kthread_release(void)
+{
+
+ rumpuser__hyp.hyp_schedule();
+ rumpuser__hyp.hyp_lwproc_release();
+ rumpuser__hyp.hyp_unschedule();
+}
diff -r c37d0597e318 -r 52801486ec9c lib/librumpuser/rumpuser_component.h
--- a/lib/librumpuser/rumpuser_component.h Mon Apr 29 15:05:35 2013 +0000
+++ b/lib/librumpuser/rumpuser_component.h Mon Apr 29 15:20:05 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rumpuser_component.h,v 1.1 2013/03/01 18:15:36 pooka Exp $ */
+/* $NetBSD: rumpuser_component.h,v 1.2 2013/04/29 15:20:05 pooka Exp $ */
/*
* Copyright (c) 2013 Antti Kantee. All Rights Reserved.
@@ -31,4 +31,9 @@
void * rumpuser_component_unschedule(void);
void rumpuser_component_schedule(void *);
+void rumpuser_component_kthread(void);
+struct lwp *rumpuser_component_curlwp(void);
+void rumpuser_component_switchlwp(struct lwp *);
+void rumpuser_component_kthread_release(void);
+
#endif /* _RUMP_RUMPUSER_COMPONENT_H_ */
Home |
Main Index |
Thread Index |
Old Index