aboutsummaryrefslogtreecommitdiffstats
path: root/include/litmus/rt_param.h
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2010-02-03 19:40:01 -0500
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-29 17:26:09 -0400
commitfb95c290fe461de794c984bc4130741f04f9142d (patch)
treee548d3eca0e4148ee764343db6a1d9e5f9e98d05 /include/litmus/rt_param.h
parentb973c95c86e6710c913c01a67013605f68a3c2c3 (diff)
Re-implement non-preemptive section support.
Re-introduce NP sections in the configuration and in litmus.h. Remove the old np_flag from rt_param. If CONFIG_NP_SECTION is disabled, then all non-preemptive section checks are constant expressions which should get removed by the dead code elimination during optimization. Instead of re-implementing sys_exit_np(), we simply repurposed sched_yield() for calling into the scheduler to trigger delayed preemptions.
Diffstat (limited to 'include/litmus/rt_param.h')
-rw-r--r--include/litmus/rt_param.h27
1 files changed, 7 insertions, 20 deletions
diff --git a/include/litmus/rt_param.h b/include/litmus/rt_param.h
index 9353251fb30e..5b94d1a8eea7 100644
--- a/include/litmus/rt_param.h
+++ b/include/litmus/rt_param.h
@@ -85,7 +85,6 @@ struct rt_job {
85 unsigned int job_no; 85 unsigned int job_no;
86}; 86};
87 87
88
89struct pfair_param; 88struct pfair_param;
90 89
91/* RT task parameters for scheduling extensions 90/* RT task parameters for scheduling extensions
@@ -116,26 +115,14 @@ struct rt_param {
116 */ 115 */
117 struct task_struct* inh_task; 116 struct task_struct* inh_task;
118 117
119 /* Don't just dereference this pointer in kernel space! 118#ifdef CONFIG_NP_SECTION
120 * It might very well point to junk or nothing at all. 119 /* For the FMLP under PSN-EDF, it is required to make the task
121 * NULL indicates that the task has not requested any non-preemptable 120 * non-preemptive from kernel space. In order not to interfere with
122 * section support. 121 * user space, this counter indicates the kernel space np setting.
123 * Not inherited upon fork. 122 * kernel_np > 0 => task is non-preemptive
124 */ 123 */
125 short* np_flag; 124 unsigned int kernel_np;
126 125#endif
127 /* re-use unused counter in plugins that don't need it */
128 union {
129 /* For the FMLP under PSN-EDF, it is required to make the task
130 * non-preemptive from kernel space. In order not to interfere with
131 * user space, this counter indicates the kernel space np setting.
132 * kernel_np > 0 => task is non-preemptive
133 */
134 unsigned int kernel_np;
135
136 /* Used by GQ-EDF */
137 unsigned int last_cpu;
138 };
139 126
140 /* This field can be used by plugins to store where the task 127 /* This field can be used by plugins to store where the task
141 * is currently scheduled. It is the responsibility of the 128 * is currently scheduled. It is the responsibility of the