diff options
| author | Jeff Garzik <jgarzik@pobox.com> | 2005-11-04 21:39:31 -0500 |
|---|---|---|
| committer | Jeff Garzik <jgarzik@pobox.com> | 2005-11-04 21:39:31 -0500 |
| commit | c2cc87ca9561ddfe744d446789cc10f507e87db9 (patch) | |
| tree | d505fc0110eb1a3d8750ba2f67648c131f0d9aca /kernel/posix-cpu-timers.c | |
| parent | ce1eeb95fc4eb25109c00bea3e83a87eeff6b07d (diff) | |
| parent | 7015faa7df829876a0f931cd18aa6d7c24a1b581 (diff) | |
Merge branch 'master'
Diffstat (limited to 'kernel/posix-cpu-timers.c')
| -rw-r--r-- | kernel/posix-cpu-timers.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index bf374fceb39c..91a894264941 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
| @@ -1225,7 +1225,7 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) | |||
| 1225 | /* | 1225 | /* |
| 1226 | * The task was cleaned up already, no future firings. | 1226 | * The task was cleaned up already, no future firings. |
| 1227 | */ | 1227 | */ |
| 1228 | return; | 1228 | goto out; |
| 1229 | 1229 | ||
| 1230 | /* | 1230 | /* |
| 1231 | * Fetch the current sample and update the timer's expiry time. | 1231 | * Fetch the current sample and update the timer's expiry time. |
| @@ -1235,7 +1235,7 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) | |||
| 1235 | bump_cpu_timer(timer, now); | 1235 | bump_cpu_timer(timer, now); |
| 1236 | if (unlikely(p->exit_state)) { | 1236 | if (unlikely(p->exit_state)) { |
| 1237 | clear_dead_task(timer, now); | 1237 | clear_dead_task(timer, now); |
| 1238 | return; | 1238 | goto out; |
| 1239 | } | 1239 | } |
| 1240 | read_lock(&tasklist_lock); /* arm_timer needs it. */ | 1240 | read_lock(&tasklist_lock); /* arm_timer needs it. */ |
| 1241 | } else { | 1241 | } else { |
| @@ -1248,8 +1248,7 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) | |||
| 1248 | put_task_struct(p); | 1248 | put_task_struct(p); |
| 1249 | timer->it.cpu.task = p = NULL; | 1249 | timer->it.cpu.task = p = NULL; |
| 1250 | timer->it.cpu.expires.sched = 0; | 1250 | timer->it.cpu.expires.sched = 0; |
| 1251 | read_unlock(&tasklist_lock); | 1251 | goto out_unlock; |
| 1252 | return; | ||
| 1253 | } else if (unlikely(p->exit_state) && thread_group_empty(p)) { | 1252 | } else if (unlikely(p->exit_state) && thread_group_empty(p)) { |
| 1254 | /* | 1253 | /* |
| 1255 | * We've noticed that the thread is dead, but | 1254 | * We've noticed that the thread is dead, but |
| @@ -1257,8 +1256,7 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) | |||
| 1257 | * drop our task ref. | 1256 | * drop our task ref. |
| 1258 | */ | 1257 | */ |
| 1259 | clear_dead_task(timer, now); | 1258 | clear_dead_task(timer, now); |
| 1260 | read_unlock(&tasklist_lock); | 1259 | goto out_unlock; |
| 1261 | return; | ||
| 1262 | } | 1260 | } |
| 1263 | cpu_clock_sample_group(timer->it_clock, p, &now); | 1261 | cpu_clock_sample_group(timer->it_clock, p, &now); |
| 1264 | bump_cpu_timer(timer, now); | 1262 | bump_cpu_timer(timer, now); |
| @@ -1270,7 +1268,13 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) | |||
| 1270 | */ | 1268 | */ |
| 1271 | arm_timer(timer, now); | 1269 | arm_timer(timer, now); |
| 1272 | 1270 | ||
| 1271 | out_unlock: | ||
| 1273 | read_unlock(&tasklist_lock); | 1272 | read_unlock(&tasklist_lock); |
| 1273 | |||
| 1274 | out: | ||
| 1275 | timer->it_overrun_last = timer->it_overrun; | ||
| 1276 | timer->it_overrun = -1; | ||
| 1277 | ++timer->it_requeue_pending; | ||
| 1274 | } | 1278 | } |
| 1275 | 1279 | ||
| 1276 | /* | 1280 | /* |
