aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/posix-cpu-timers.c
diff options
context:
space:
mode:
authorLen Brown <len.brown@intel.com>2006-01-07 02:05:40 -0500
committerLen Brown <len.brown@intel.com>2006-01-07 02:05:40 -0500
commitadd5b5ee992e40c9cd8697ea94c223628be162a7 (patch)
tree7f3f279f3e6b41e61d7dfaf4d25a5251024a7185 /kernel/posix-cpu-timers.c
parent25da0974601fc8096461f3d3f7ca3aab8e79adfb (diff)
parent0aec63e67c69545ca757a73a66f5dcf05fa484bf (diff)
Auto-update from upstream
Diffstat (limited to 'kernel/posix-cpu-timers.c')
-rw-r--r--kernel/posix-cpu-timers.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c
index cae4f572899..4c68edff900 100644
--- a/kernel/posix-cpu-timers.c
+++ b/kernel/posix-cpu-timers.c
@@ -238,18 +238,7 @@ static int cpu_clock_sample_group_locked(unsigned int clock_idx,
238 while ((t = next_thread(t)) != p) { 238 while ((t = next_thread(t)) != p) {
239 cpu->sched += t->sched_time; 239 cpu->sched += t->sched_time;
240 } 240 }
241 if (p->tgid == current->tgid) { 241 cpu->sched += sched_ns(p);
242 /*
243 * We're sampling ourselves, so include the
244 * cycles not yet banked. We still omit
245 * other threads running on other CPUs,
246 * so the total can always be behind as
247 * much as max(nthreads-1,ncpus) * (NSEC_PER_SEC/HZ).
248 */
249 cpu->sched += current_sched_time(current);
250 } else {
251 cpu->sched += p->sched_time;
252 }
253 break; 242 break;
254 } 243 }
255 return 0; 244 return 0;