|
@@ -404,14 +404,8 @@ static void cleanup_timers_list(struct list_head *head,
|
|
{
|
|
{
|
|
struct cpu_timer_list *timer, *next;
|
|
struct cpu_timer_list *timer, *next;
|
|
|
|
|
|
- list_for_each_entry_safe(timer, next, head, entry) {
|
|
|
|
|
|
+ list_for_each_entry_safe(timer, next, head, entry)
|
|
list_del_init(&timer->entry);
|
|
list_del_init(&timer->entry);
|
|
- if (timer->expires < curr) {
|
|
|
|
- timer->expires = 0;
|
|
|
|
- } else {
|
|
|
|
- timer->expires -= curr;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -459,15 +453,21 @@ void posix_cpu_timers_exit_group(struct task_struct *tsk)
|
|
tsk->se.sum_exec_runtime + sig->sum_sched_runtime);
|
|
tsk->se.sum_exec_runtime + sig->sum_sched_runtime);
|
|
}
|
|
}
|
|
|
|
|
|
-static void clear_dead_task(struct k_itimer *timer, unsigned long long now)
|
|
|
|
|
|
+static void clear_dead_task(struct k_itimer *itimer, unsigned long long now)
|
|
{
|
|
{
|
|
|
|
+ struct cpu_timer_list *timer = &itimer->it.cpu;
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* That's all for this thread or process.
|
|
* That's all for this thread or process.
|
|
* We leave our residual in expires to be reported.
|
|
* We leave our residual in expires to be reported.
|
|
*/
|
|
*/
|
|
- put_task_struct(timer->it.cpu.task);
|
|
|
|
- timer->it.cpu.task = NULL;
|
|
|
|
- timer->it.cpu.expires -= now;
|
|
|
|
|
|
+ put_task_struct(timer->task);
|
|
|
|
+ timer->task = NULL;
|
|
|
|
+ if (timer->expires < now) {
|
|
|
|
+ timer->expires = 0;
|
|
|
|
+ } else {
|
|
|
|
+ timer->expires -= now;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
static inline int expires_gt(cputime_t expires, cputime_t new_exp)
|
|
static inline int expires_gt(cputime_t expires, cputime_t new_exp)
|