Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 350147
b: refs/heads/master
c: cdc4e86
h: refs/heads/master
i:
  350145: bd4d511
  350143: 3546d2e
v: v3
  • Loading branch information
Thomas Gleixner authored and Ingo Molnar committed Feb 19, 2013
1 parent 9adcbc8 commit 84ad782
Show file tree
Hide file tree
Showing 2 changed files with 5 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: 993db4b45fd99949d8f6e004a7744b523dca473a
refs/heads/master: cdc4e86b58a95005ef500916b4a8e91a0037a822
10 changes: 4 additions & 6 deletions trunk/kernel/sched/cputime.c
Original file line number Diff line number Diff line change
Expand Up @@ -729,18 +729,17 @@ void vtime_init_idle(struct task_struct *t)

cputime_t task_gtime(struct task_struct *t)
{
unsigned long flags;
unsigned int seq;
cputime_t gtime;

do {
seq = read_seqbegin_irqsave(&t->vtime_seqlock, flags);
seq = read_seqbegin(&t->vtime_seqlock);

gtime = t->gtime;
if (t->flags & PF_VCPU)
gtime += vtime_delta(t);

} while (read_seqretry_irqrestore(&t->vtime_seqlock, seq, flags));
} while (read_seqretry(&t->vtime_seqlock, seq));

return gtime;
}
Expand All @@ -756,15 +755,14 @@ fetch_task_cputime(struct task_struct *t,
cputime_t *u_src, cputime_t *s_src,
cputime_t *udelta, cputime_t *sdelta)
{
unsigned long flags;
unsigned int seq;
unsigned long long delta;

do {
*udelta = 0;
*sdelta = 0;

seq = read_seqbegin_irqsave(&t->vtime_seqlock, flags);
seq = read_seqbegin(&t->vtime_seqlock);

if (u_dst)
*u_dst = *u_src;
Expand All @@ -788,7 +786,7 @@ fetch_task_cputime(struct task_struct *t,
if (t->vtime_snap_whence == VTIME_SYS)
*sdelta = delta;
}
} while (read_seqretry_irqrestore(&t->vtime_seqlock, seq, flags));
} while (read_seqretry(&t->vtime_seqlock, seq));
}


Expand Down

0 comments on commit 84ad782

Please sign in to comment.