diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-09-28 11:10:05 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-09-28 11:10:36 -0400 |
commit | cd1a44203a671a8995ae986965ecf6a8edaf491c (patch) | |
tree | f90c131e1334edf607d39e091c76bdfa2ab9cdec | |
parent | 0c56ebffe68e71b0de3505386401c212984242b7 (diff) |
Use hrtimer_start_on_info_init()
-rw-r--r-- | litmus/sched_npsf.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/litmus/sched_npsf.c b/litmus/sched_npsf.c index 25c71458fa2d..9eb6662e7ae8 100644 --- a/litmus/sched_npsf.c +++ b/litmus/sched_npsf.c | |||
@@ -1032,9 +1032,6 @@ void npsf_hrtimers_cleanup(void) | |||
1032 | for_each_online_cpu(cpu) { | 1032 | for_each_online_cpu(cpu) { |
1033 | entry = &per_cpu(npsf_cpu_entries, cpu); | 1033 | entry = &per_cpu(npsf_cpu_entries, cpu); |
1034 | 1034 | ||
1035 | /* be sure to cleanup pull_timer state */ | ||
1036 | atomic_set(&entry->info.state, HRTIMER_START_ON_INACTIVE); | ||
1037 | |||
1038 | /* if callback active, skip it for now and redo later */ | 1035 | /* if callback active, skip it for now and redo later */ |
1039 | if (hrtimer_try_to_cancel(&entry->timer) == -1) { | 1036 | if (hrtimer_try_to_cancel(&entry->timer) == -1) { |
1040 | redo = 1; | 1037 | redo = 1; |
@@ -1125,6 +1122,10 @@ static long npsf_activate_plugin(void) | |||
1125 | entry->cpu = cpu; | 1122 | entry->cpu = cpu; |
1126 | hrtimer_init(&entry->timer, CLOCK_MONOTONIC, | 1123 | hrtimer_init(&entry->timer, CLOCK_MONOTONIC, |
1127 | HRTIMER_MODE_ABS_PINNED); | 1124 | HRTIMER_MODE_ABS_PINNED); |
1125 | |||
1126 | /* initialize (reinitialize) pull timers */ | ||
1127 | hrtimer_start_on_info_init(&entry->info); | ||
1128 | |||
1128 | entry->timer.function = reserve_switch_tick; | 1129 | entry->timer.function = reserve_switch_tick; |
1129 | entry->last_seen_npsf_id = -1; | 1130 | entry->last_seen_npsf_id = -1; |
1130 | } | 1131 | } |