aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2007-04-17 21:29:42 -0400
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2007-04-17 21:29:42 -0400
commit2598391816bc260d52d77d4cf55b772b39bba72f (patch)
tree3e7d430a862b3e4aaef68d10217d1c4aba57b306 /kernel
parent81759c3a5de3a55bca0593ab1bc592d9c3f5dfc0 (diff)
Add enter_np/exit_np callbacks for non-preemptable sections support
Diffstat (limited to 'kernel')
-rw-r--r--kernel/litmus.c4
-rw-r--r--kernel/sched_plugin.c9
2 files changed, 13 insertions, 0 deletions
diff --git a/kernel/litmus.c b/kernel/litmus.c
index b420ab1464..eef223639b 100644
--- a/kernel/litmus.c
+++ b/kernel/litmus.c
@@ -394,6 +394,8 @@ void litmus_dummy_task_blocks(struct task_struct *task);
394long litmus_dummy_tear_down(struct task_struct *task); 394long litmus_dummy_tear_down(struct task_struct *task);
395int litmus_dummy_scheduler_setup(int cmd, void __user *parameter); 395int litmus_dummy_scheduler_setup(int cmd, void __user *parameter);
396long litmus_dummy_sleep_next_period(void); 396long litmus_dummy_sleep_next_period(void);
397long litmus_dummy_enter_np(struct task_struct *task);
398long litmus_dummy_exit_np(struct task_struct *task);
397 399
398#define CHECK(func) {\ 400#define CHECK(func) {\
399 if (!curr_sched_plugin->func) \ 401 if (!curr_sched_plugin->func) \
@@ -439,6 +441,8 @@ out:
439 CHECK(prepare_task); 441 CHECK(prepare_task);
440 CHECK(scheduler_setup); 442 CHECK(scheduler_setup);
441 CHECK(sleep_next_period); 443 CHECK(sleep_next_period);
444 CHECK(enter_np);
445 CHECK(exit_np);
442 446
443#ifdef CONFIG_MAGIC_SYSRQ 447#ifdef CONFIG_MAGIC_SYSRQ
444 /* offer some debugging help */ 448 /* offer some debugging help */
diff --git a/kernel/sched_plugin.c b/kernel/sched_plugin.c
index fa8339ba78..d8ae03c768 100644
--- a/kernel/sched_plugin.c
+++ b/kernel/sched_plugin.c
@@ -58,6 +58,15 @@ long litmus_dummy_tear_down(struct task_struct *task)
58 return 0; 58 return 0;
59} 59}
60 60
61long litmus_dummy_enter_np(struct task_struct *task)
62{
63 return -EPERM;
64}
65
66long litmus_dummy_exit_np(struct task_struct *task)
67{
68 return -EPERM;
69}
61 70
62int litmus_dummy_scheduler_setup(int cmd, void __user *parameter) 71int litmus_dummy_scheduler_setup(int cmd, void __user *parameter)
63{ 72{