aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-08-29 04:34:18 -0400
committerThomas Gleixner <tglx@linutronix.de>2009-08-29 04:34:29 -0400
commitf71bb0ac5e85410601b0db29d7b1635345ea61a4 (patch)
tree7c3ef70ef008db87d8b71e5de0632766ecd64d2f /include
parent7285dd7fd375763bfb8ab1ac9cf3f1206f503c16 (diff)
parenta42548a18866e87092db93b771e6c5b060d78401 (diff)
Merge branch 'timers/posixtimers' into timers/tracing
Merge reason: timer tracepoint patches depend on both branches Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r--include/asm-generic/cputime.h1
-rw-r--r--include/linux/sched.h16
2 files changed, 14 insertions, 3 deletions
diff --git a/include/asm-generic/cputime.h b/include/asm-generic/cputime.h
index 1c1fa422d18a..ca0f239f0e13 100644
--- a/include/asm-generic/cputime.h
+++ b/include/asm-generic/cputime.h
@@ -7,6 +7,7 @@
7typedef unsigned long cputime_t; 7typedef unsigned long cputime_t;
8 8
9#define cputime_zero (0UL) 9#define cputime_zero (0UL)
10#define cputime_one_jiffy jiffies_to_cputime(1)
10#define cputime_max ((~0UL >> 1) - 1) 11#define cputime_max ((~0UL >> 1) - 1)
11#define cputime_add(__a, __b) ((__a) + (__b)) 12#define cputime_add(__a, __b) ((__a) + (__b))
12#define cputime_sub(__a, __b) ((__a) - (__b)) 13#define cputime_sub(__a, __b) ((__a) - (__b))
diff --git a/include/linux/sched.h b/include/linux/sched.h
index 3ab08e4bb6b8..a069e65e8bb7 100644
--- a/include/linux/sched.h
+++ b/include/linux/sched.h
@@ -470,6 +470,13 @@ struct pacct_struct {
470 unsigned long ac_minflt, ac_majflt; 470 unsigned long ac_minflt, ac_majflt;
471}; 471};
472 472
473struct cpu_itimer {
474 cputime_t expires;
475 cputime_t incr;
476 u32 error;
477 u32 incr_error;
478};
479
473/** 480/**
474 * struct task_cputime - collected CPU time counts 481 * struct task_cputime - collected CPU time counts
475 * @utime: time spent in user mode, in &cputime_t units 482 * @utime: time spent in user mode, in &cputime_t units
@@ -564,9 +571,12 @@ struct signal_struct {
564 struct pid *leader_pid; 571 struct pid *leader_pid;
565 ktime_t it_real_incr; 572 ktime_t it_real_incr;
566 573
567 /* ITIMER_PROF and ITIMER_VIRTUAL timers for the process */ 574 /*
568 cputime_t it_prof_expires, it_virt_expires; 575 * ITIMER_PROF and ITIMER_VIRTUAL timers for the process, we use
569 cputime_t it_prof_incr, it_virt_incr; 576 * CPUCLOCK_PROF and CPUCLOCK_VIRT for indexing array as these
577 * values are defined to 0 and 1 respectively
578 */
579 struct cpu_itimer it[2];
570 580
571 /* 581 /*
572 * Thread group totals for process CPU timers. 582 * Thread group totals for process CPU timers.