diff options
author | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
---|---|---|
committer | Glenn Elliott <gelliott@cs.unc.edu> | 2012-03-04 19:47:13 -0500 |
commit | c71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch) | |
tree | ecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /litmus/litmus.c | |
parent | ea53c912f8a86a8567697115b6a0d8152beee5c8 (diff) | |
parent | 6a00f206debf8a5c8899055726ad127dbeeed098 (diff) |
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts:
litmus/sched_cedf.c
Diffstat (limited to 'litmus/litmus.c')
-rw-r--r-- | litmus/litmus.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/litmus/litmus.c b/litmus/litmus.c index 11ccaafd50de..301390148d02 100644 --- a/litmus/litmus.c +++ b/litmus/litmus.c | |||
@@ -17,6 +17,10 @@ | |||
17 | #include <litmus/litmus_proc.h> | 17 | #include <litmus/litmus_proc.h> |
18 | #include <litmus/sched_trace.h> | 18 | #include <litmus/sched_trace.h> |
19 | 19 | ||
20 | #ifdef CONFIG_SCHED_CPU_AFFINITY | ||
21 | #include <litmus/affinity.h> | ||
22 | #endif | ||
23 | |||
20 | /* Number of RT tasks that exist in the system */ | 24 | /* Number of RT tasks that exist in the system */ |
21 | atomic_t rt_task_count = ATOMIC_INIT(0); | 25 | atomic_t rt_task_count = ATOMIC_INIT(0); |
22 | static DEFINE_RAW_SPINLOCK(task_transition_lock); | 26 | static DEFINE_RAW_SPINLOCK(task_transition_lock); |
@@ -110,6 +114,14 @@ asmlinkage long sys_set_rt_task_param(pid_t pid, struct rt_task __user * param) | |||
110 | "because wcet > period\n", pid); | 114 | "because wcet > period\n", pid); |
111 | goto out_unlock; | 115 | goto out_unlock; |
112 | } | 116 | } |
117 | if ( tp.cls != RT_CLASS_HARD && | ||
118 | tp.cls != RT_CLASS_SOFT && | ||
119 | tp.cls != RT_CLASS_BEST_EFFORT) | ||
120 | { | ||
121 | printk(KERN_INFO "litmus: real-time task %d rejected " | ||
122 | "because its class is invalid\n", pid); | ||
123 | goto out_unlock; | ||
124 | } | ||
113 | if (tp.budget_policy != NO_ENFORCEMENT && | 125 | if (tp.budget_policy != NO_ENFORCEMENT && |
114 | tp.budget_policy != QUANTUM_ENFORCEMENT && | 126 | tp.budget_policy != QUANTUM_ENFORCEMENT && |
115 | tp.budget_policy != PRECISE_ENFORCEMENT) | 127 | tp.budget_policy != PRECISE_ENFORCEMENT) |
@@ -517,6 +529,8 @@ static int __init _init_litmus(void) | |||
517 | */ | 529 | */ |
518 | printk("Starting LITMUS^RT kernel\n"); | 530 | printk("Starting LITMUS^RT kernel\n"); |
519 | 531 | ||
532 | BUILD_BUG_ON(sizeof(union np_flag) != sizeof(uint32_t)); | ||
533 | |||
520 | register_sched_plugin(&linux_sched_plugin); | 534 | register_sched_plugin(&linux_sched_plugin); |
521 | 535 | ||
522 | bheap_node_cache = KMEM_CACHE(bheap_node, SLAB_PANIC); | 536 | bheap_node_cache = KMEM_CACHE(bheap_node, SLAB_PANIC); |
@@ -532,6 +546,10 @@ static int __init _init_litmus(void) | |||
532 | 546 | ||
533 | init_litmus_proc(); | 547 | init_litmus_proc(); |
534 | 548 | ||
549 | #ifdef CONFIG_SCHED_CPU_AFFINITY | ||
550 | init_topology(); | ||
551 | #endif | ||
552 | |||
535 | return 0; | 553 | return 0; |
536 | } | 554 | } |
537 | 555 | ||