aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/rt_param.h
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-07-28 01:15:58 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-11-24 15:21:08 -0500
commit5bd89a34d89f252619d83fef3c9325e24311389e (patch)
tree0860be1b38ce94b09f8715e47a130f4da1827408 /include/litmus/rt_param.h
parent81b8eb2ae452c241df9b3a1fb2116fa4d5adcb75 (diff)
Litmus core: simplify np-section protocolwip-2011.2-bbb
User a 32-bit word for all non-preemptive section flags. Set the "please yield soon" flag atomically when accessing it on remotely-scheduled tasks.
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r--include/litmus/rt_param.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index 389be0775869..d6d799174160 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -42,6 +42,16 @@ struct rt_task {
42 budget_policy_t budget_policy; /* ignored by pfair */ 42 budget_policy_t budget_policy; /* ignored by pfair */
43}; 43};
44 44
45union np_flag {
46 uint32_t raw;
47 struct {
48 /* Is the task currently in a non-preemptive section? */
49 uint32_t flag:31;
50 /* Should the task call into the scheduler? */
51 uint32_t preempt:1;
52 } np;
53};
54
45/* The definition of the data that is shared between the kernel and real-time 55/* The definition of the data that is shared between the kernel and real-time
46 * tasks via a shared page (see litmus/ctrldev.c). 56 * tasks via a shared page (see litmus/ctrldev.c).
47 * 57 *
@@ -57,11 +67,7 @@ struct rt_task {
57 * determining preemption/migration overheads). 67 * determining preemption/migration overheads).
58 */ 68 */
59struct control_page { 69struct control_page {
60 /* Is the task currently in a non-preemptive section? */ 70 volatile union np_flag sched;
61 int np_flag;
62 /* Should the task call into the kernel when it leaves
63 * its non-preemptive section? */
64 int delayed_preemption;
65 71
66 /* to be extended */ 72 /* to be extended */
67}; 73};