Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11880
b: refs/heads/master
c: 708f430
h: refs/heads/master
v: v3
  • Loading branch information
Roland McGrath authored and Linus Torvalds committed Oct 31, 2005
1 parent 14e67cf commit 36c8d79
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a241ec65aeac3d69a08a7b153cccbdb7ea35063f
refs/heads/master: 708f430dcc50787d1c0b5c31962a5ff0dd8e35eb
16 changes: 10 additions & 6 deletions trunk/kernel/posix-cpu-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1225,7 +1225,7 @@ void posix_cpu_timer_schedule(struct k_itimer *timer)
/*
* The task was cleaned up already, no future firings.
*/
return;
goto out;

/*
* Fetch the current sample and update the timer's expiry time.
Expand All @@ -1235,7 +1235,7 @@ void posix_cpu_timer_schedule(struct k_itimer *timer)
bump_cpu_timer(timer, now);
if (unlikely(p->exit_state)) {
clear_dead_task(timer, now);
return;
goto out;
}
read_lock(&tasklist_lock); /* arm_timer needs it. */
} else {
Expand All @@ -1248,17 +1248,15 @@ void posix_cpu_timer_schedule(struct k_itimer *timer)
put_task_struct(p);
timer->it.cpu.task = p = NULL;
timer->it.cpu.expires.sched = 0;
read_unlock(&tasklist_lock);
return;
goto out_unlock;
} else if (unlikely(p->exit_state) && thread_group_empty(p)) {
/*
* We've noticed that the thread is dead, but
* not yet reaped. Take this opportunity to
* drop our task ref.
*/
clear_dead_task(timer, now);
read_unlock(&tasklist_lock);
return;
goto out_unlock;
}
cpu_clock_sample_group(timer->it_clock, p, &now);
bump_cpu_timer(timer, now);
Expand All @@ -1270,7 +1268,13 @@ void posix_cpu_timer_schedule(struct k_itimer *timer)
*/
arm_timer(timer, now);

out_unlock:
read_unlock(&tasklist_lock);

out:
timer->it_overrun_last = timer->it_overrun;
timer->it_overrun = -1;
++timer->it_requeue_pending;
}

/*
Expand Down

0 comments on commit 36c8d79

Please sign in to comment.