diff options
Diffstat (limited to 'kernel/litmus.c')
-rw-r--r-- | kernel/litmus.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/kernel/litmus.c b/kernel/litmus.c index ee1e09a627..8f238ba979 100644 --- a/kernel/litmus.c +++ b/kernel/litmus.c | |||
@@ -19,25 +19,22 @@ | |||
19 | spolicy sched_policy = SCHED_DEFAULT; | 19 | spolicy sched_policy = SCHED_DEFAULT; |
20 | int sched_options = 0; | 20 | int sched_options = 0; |
21 | 21 | ||
22 | /* avoid races with multiple task wake-ups */ | ||
23 | DEFINE_SPINLOCK(litmus_task_set_lock); | ||
24 | 22 | ||
25 | /* This is a flag for switching the system into RT mode when it is booted up | 23 | /* This is a flag for switching the system into RT mode when it is booted up |
26 | * In RT-mode non-realtime tasks are shut down and scheduled as spare | 24 | * In RT-mode non-realtime tasks are scheduled as background tasks. |
27 | * time available | ||
28 | */ | 25 | */ |
29 | 26 | ||
30 | /* The system is booting in non-realtime mode */ | 27 | /* The system is booting in non-realtime mode */ |
31 | atomic_t rt_mode = ATOMIC_INIT(MODE_NON_RT); | 28 | atomic_t rt_mode = ATOMIC_INIT(MODE_NON_RT); |
32 | /* Here we specify a mode change to be made */ | 29 | /* Here we specify a mode change to be made */ |
33 | atomic_t new_mode = ATOMIC_INIT(MODE_NON_RT); | 30 | atomic_t new_mode = ATOMIC_INIT(MODE_NON_RT); |
34 | /* Number of RT tasks that exist in the system */ | 31 | /* Number of RT tasks that exist in the system */ |
35 | atomic_t n_rt_tasks = ATOMIC_INIT(0); | 32 | atomic_t n_rt_tasks = ATOMIC_INIT(0); |
36 | 33 | ||
37 | /* Only one process can perform mode change */ | 34 | /* Only one CPU may perform a mode change. */ |
38 | static queuelock_t mode_change_lock; | 35 | static queuelock_t mode_change_lock; |
39 | 36 | ||
40 | /* A time instant when we switched to RT mode */ | 37 | /* The time instant when we switched to RT mode */ |
41 | volatile jiffie_t rt_start_time = 0; | 38 | volatile jiffie_t rt_start_time = 0; |
42 | 39 | ||
43 | /* To send signals from the scheduler | 40 | /* To send signals from the scheduler |