summaryrefslogtreecommitdiffstats
path: root/include/linux/sched.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 09:46:15 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-23 09:46:15 -0700
commit31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397 (patch)
tree6bb0c0490d66d32eca43e73abb28d8b3ab0e7b91 /include/linux/sched.h
parentff830b8e5f999d1ccbd0282a666520f0b557daa4 (diff)
parent3f0a525ebf4b8ef041a332bbe4a73aee94bb064b (diff)
downloadop-kernel-dev-31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397.zip
op-kernel-dev-31bbb9b58d1e8ebcf2b28c95c2250a9f8e31e397.tar.gz
Merge branch 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: itimers: Add tracepoints for itimer hrtimer: Add tracepoint for hrtimers timers: Add tracepoints for timer_list timers cputime: Optimize jiffies_to_cputime(1) itimers: Simplify arm_timer() code a bit itimers: Fix periodic tics precision itimers: Merge ITIMER_VIRT and ITIMER_PROF Trivial header file include conflicts in kernel/fork.c
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r--include/linux/sched.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3cbc6c0..cbf2a3b 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -493,6 +493,13 @@ struct pacct_struct {
unsigned long ac_minflt, ac_majflt;
};
+struct cpu_itimer {
+ cputime_t expires;
+ cputime_t incr;
+ u32 error;
+ u32 incr_error;
+};
+
/**
* struct task_cputime - collected CPU time counts
* @utime: time spent in user mode, in &cputime_t units
@@ -587,9 +594,12 @@ struct signal_struct {
struct pid *leader_pid;
ktime_t it_real_incr;
- /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */
- cputime_t it_prof_expires, it_virt_expires;
- cputime_t it_prof_incr, it_virt_incr;
+ /*
+ * ITIMER_PROF and ITIMER_VIRTUAL timers for the process, we use
+ * CPUCLOCK_PROF and CPUCLOCK_VIRT for indexing array as these
+ * values are defined to 0 and 1 respectively
+ */
+ struct cpu_itimer it[2];
/*
* Thread group totals for process CPU timers.
OpenPOWER on IntegriCloud