aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/hrtimer.h
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-23 00:47:29 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2009-07-23 00:47:29 -0400
commitbd072111e7319d90a7b8127f91c2806b9a6f279e (patch)
tree1686978814a2387ebfc16f9f5778a7f0caaf319b /include/linux/hrtimer.h
parent24d01c0681bfbc10a99304c48a89ad213d2d7a4b (diff)
parent4be3bd7849165e7efa6b0b35a23d6a3598d97465 (diff)
Merge commit 'v2.6.31-rc4' into next
Diffstat (limited to 'include/linux/hrtimer.h')
-rw-r--r--include/linux/hrtimer.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h
index 0d2f7c8a33d6..4759917adc71 100644
--- a/include/linux/hrtimer.h
+++ b/include/linux/hrtimer.h
@@ -21,6 +21,7 @@
21#include <linux/list.h> 21#include <linux/list.h>
22#include <linux/wait.h> 22#include <linux/wait.h>
23#include <linux/percpu.h> 23#include <linux/percpu.h>
24#include <linux/timer.h>
24 25
25 26
26struct hrtimer_clock_base; 27struct hrtimer_clock_base;
@@ -30,8 +31,11 @@ struct hrtimer_cpu_base;
30 * Mode arguments of xxx_hrtimer functions: 31 * Mode arguments of xxx_hrtimer functions:
31 */ 32 */
32enum hrtimer_mode { 33enum hrtimer_mode {
33 HRTIMER_MODE_ABS, /* Time value is absolute */ 34 HRTIMER_MODE_ABS = 0x0, /* Time value is absolute */
34 HRTIMER_MODE_REL, /* Time value is relative to now */ 35 HRTIMER_MODE_REL = 0x1, /* Time value is relative to now */
36 HRTIMER_MODE_PINNED = 0x02, /* Timer is bound to CPU */
37 HRTIMER_MODE_ABS_PINNED = 0x02,
38 HRTIMER_MODE_REL_PINNED = 0x03,
35}; 39};
36 40
37/* 41/*
@@ -444,6 +448,8 @@ extern void timer_stats_update_stats(void *timer, pid_t pid, void *startf,
444 448
445static inline void timer_stats_account_hrtimer(struct hrtimer *timer) 449static inline void timer_stats_account_hrtimer(struct hrtimer *timer)
446{ 450{
451 if (likely(!timer->start_site))
452 return;
447 timer_stats_update_stats(timer, timer->start_pid, timer->start_site, 453 timer_stats_update_stats(timer, timer->start_pid, timer->start_site,
448 timer->function, timer->start_comm, 0); 454 timer->function, timer->start_comm, 0);
449} 455}
@@ -453,6 +459,8 @@ extern void __timer_stats_hrtimer_set_start_info(struct hrtimer *timer,
453 459
454static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer) 460static inline void timer_stats_hrtimer_set_start_info(struct hrtimer *timer)
455{ 461{
462 if (likely(!timer_stats_active))
463 return;
456 __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0)); 464 __timer_stats_hrtimer_set_start_info(timer, __builtin_return_address(0));
457} 465}
458 466