diff options
author | Jeremy Erickson <jerickso@cs.unc.edu> | 2012-08-30 12:19:46 -0400 |
---|---|---|
committer | Jeremy Erickson <jerickso@cs.unc.edu> | 2012-08-30 12:19:46 -0400 |
commit | 2d49efa8497aceda474122860b78e393838d2019 (patch) | |
tree | 749c687752836708115f02ee527aba33875b8617 /litmus | |
parent | e35c1337da0f35dfe8fba2a42239842b7c0abb9e (diff) |
Fix warnings about preemptible code
Diffstat (limited to 'litmus')
-rw-r--r-- | litmus/sched_gfl_split.c | 3 | ||||
-rw-r--r-- | litmus/sched_gsn_edf_split.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/litmus/sched_gfl_split.c b/litmus/sched_gfl_split.c index 70099ee3c64f..cc4da73d32c7 100644 --- a/litmus/sched_gfl_split.c +++ b/litmus/sched_gfl_split.c | |||
@@ -875,7 +875,7 @@ int gflsplit_fmlp_lock(struct litmus_lock* l) | |||
875 | { | 875 | { |
876 | struct task_struct* t = current; | 876 | struct task_struct* t = current; |
877 | struct fmlp_semaphore *sem = fmlp_from_lock(l); | 877 | struct fmlp_semaphore *sem = fmlp_from_lock(l); |
878 | cpu_entry_t* entry = &__get_cpu_var(gflsplit_cpu_entries); | 878 | cpu_entry_t* entry; |
879 | wait_queue_t wait; | 879 | wait_queue_t wait; |
880 | unsigned long flags; | 880 | unsigned long flags; |
881 | 881 | ||
@@ -883,6 +883,7 @@ int gflsplit_fmlp_lock(struct litmus_lock* l) | |||
883 | return -EPERM; | 883 | return -EPERM; |
884 | 884 | ||
885 | spin_lock_irqsave(&sem->wait.lock, flags); | 885 | spin_lock_irqsave(&sem->wait.lock, flags); |
886 | entry = &__get_cpu_var(gflsplit_cpu_entries); | ||
886 | 887 | ||
887 | tsk_rt(t)->in_crit_section = 1; | 888 | tsk_rt(t)->in_crit_section = 1; |
888 | if (entry->timer_armed) { | 889 | if (entry->timer_armed) { |
diff --git a/litmus/sched_gsn_edf_split.c b/litmus/sched_gsn_edf_split.c index 74629de619bf..0757a6bce907 100644 --- a/litmus/sched_gsn_edf_split.c +++ b/litmus/sched_gsn_edf_split.c | |||
@@ -891,7 +891,7 @@ int gsnedfsplit_fmlp_lock(struct litmus_lock* l) | |||
891 | { | 891 | { |
892 | struct task_struct* t = current; | 892 | struct task_struct* t = current; |
893 | struct fmlp_semaphore *sem = fmlp_from_lock(l); | 893 | struct fmlp_semaphore *sem = fmlp_from_lock(l); |
894 | cpu_entry_t* entry = &__get_cpu_var(gsnedfsplit_cpu_entries); | 894 | cpu_entry_t* entry; |
895 | wait_queue_t wait; | 895 | wait_queue_t wait; |
896 | unsigned long flags; | 896 | unsigned long flags; |
897 | 897 | ||
@@ -899,6 +899,7 @@ int gsnedfsplit_fmlp_lock(struct litmus_lock* l) | |||
899 | return -EPERM; | 899 | return -EPERM; |
900 | 900 | ||
901 | spin_lock_irqsave(&sem->wait.lock, flags); | 901 | spin_lock_irqsave(&sem->wait.lock, flags); |
902 | entry = &__get_cpu_var(gsnedfsplit_cpu_entries); | ||
902 | 903 | ||
903 | tsk_rt(t)->in_crit_section = 1; | 904 | tsk_rt(t)->in_crit_section = 1; |
904 | if (entry->timer_armed) { | 905 | if (entry->timer_armed) { |