diff options
author | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-04-17 21:29:42 -0400 |
---|---|---|
committer | Bjoern B. Brandenburg <bbb@cs.unc.edu> | 2007-04-17 21:29:42 -0400 |
commit | 2598391816bc260d52d77d4cf55b772b39bba72f (patch) | |
tree | 3e7d430a862b3e4aaef68d10217d1c4aba57b306 /kernel | |
parent | 81759c3a5de3a55bca0593ab1bc592d9c3f5dfc0 (diff) |
Add enter_np/exit_np callbacks for non-preemptable sections support
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/litmus.c | 4 | ||||
-rw-r--r-- | kernel/sched_plugin.c | 9 |
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); | |||
394 | long litmus_dummy_tear_down(struct task_struct *task); | 394 | long litmus_dummy_tear_down(struct task_struct *task); |
395 | int litmus_dummy_scheduler_setup(int cmd, void __user *parameter); | 395 | int litmus_dummy_scheduler_setup(int cmd, void __user *parameter); |
396 | long litmus_dummy_sleep_next_period(void); | 396 | long litmus_dummy_sleep_next_period(void); |
397 | long litmus_dummy_enter_np(struct task_struct *task); | ||
398 | long 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 | ||
61 | long litmus_dummy_enter_np(struct task_struct *task) | ||
62 | { | ||
63 | return -EPERM; | ||
64 | } | ||
65 | |||
66 | long litmus_dummy_exit_np(struct task_struct *task) | ||
67 | { | ||
68 | return -EPERM; | ||
69 | } | ||
61 | 70 | ||
62 | int litmus_dummy_scheduler_setup(int cmd, void __user *parameter) | 71 | int litmus_dummy_scheduler_setup(int cmd, void __user *parameter) |
63 | { | 72 | { |