aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2010-02-03 19:35:20 -0500
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-29 17:25:59 -0400
commitb973c95c86e6710c913c01a67013605f68a3c2c3 (patch)
tree73786af2a164c8cb89009cc4069e60b7de04bc4b /include/litmus
parent5e987d486c0f89d615d134512938fc1198b3ca67 (diff)
Add virtual LITMUS^RT control device.
This device only supports mmap()'ing a single page. This page is shared RW between the kernel and userspace. It is inteded to allow near-zero-overhead communication between the kernel and userspace. It's first use will be a proper implementation of user-signaled non-preemptable section support.
Diffstat (limited to 'include/litmus')
-rw-r--r--include/litmus/rt_param.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index e20427846273..9353251fb30e 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -35,6 +35,30 @@ struct rt_task {
35 task_class_t cls; 35 task_class_t cls;
36}; 36};
37 37
38/* The definition of the data that is shared between the kernel and real-time
39 * tasks via a shared page (see litmus/ctrldev.c).
40 *
41 * WARNING: User space can write to this, so don't trust
42 * the correctness of the fields!
43 *
44 * This servees two purposes: to enable efficient signaling
45 * of non-preemptive sections (user->kernel) and
46 * delayed preemptions (kernel->user), and to export
47 * some real-time relevant statistics such as preemption and
48 * migration data to user space. We can't use a device to export
49 * statistics because we want to avoid system call overhead when
50 * determining preemption/migration overheads).
51 */
52struct control_page {
53 /* Is the task currently in a non-preemptive section? */
54 int np_flag;
55 /* Should the task call into the kernel when it leaves
56 * its non-preemptive section? */
57 int delayed_preemption;
58
59 /* to be extended */
60};
61
38/* don't export internal data structures to user space (liblitmus) */ 62/* don't export internal data structures to user space (liblitmus) */
39#ifdef __KERNEL__ 63#ifdef __KERNEL__
40 64
@@ -163,6 +187,9 @@ struct rt_param {
163 /* Used by rt_domain to queue task in release list. 187 /* Used by rt_domain to queue task in release list.
164 */ 188 */
165 struct list_head list; 189 struct list_head list;
190
191 /* Pointer to the page shared between userspace and kernel. */
192 struct control_page * ctrl_page;
166}; 193};
167 194
168/* Possible RT flags */ 195/* Possible RT flags */