Root/
1 | #ifndef _LINUX_KERNEL_VTIME_H |
2 | #define _LINUX_KERNEL_VTIME_H |
3 | |
4 | struct task_struct; |
5 | |
6 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
7 | extern void vtime_task_switch(struct task_struct *prev); |
8 | extern void vtime_account_system(struct task_struct *tsk); |
9 | extern void vtime_account_idle(struct task_struct *tsk); |
10 | extern void vtime_account_user(struct task_struct *tsk); |
11 | extern void vtime_account_irq_enter(struct task_struct *tsk); |
12 | |
13 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_NATIVE |
14 | static inline bool vtime_accounting_enabled(void) { return true; } |
15 | #endif |
16 | |
17 | #else /* !CONFIG_VIRT_CPU_ACCOUNTING */ |
18 | |
19 | static inline void vtime_task_switch(struct task_struct *prev) { } |
20 | static inline void vtime_account_system(struct task_struct *tsk) { } |
21 | static inline void vtime_account_user(struct task_struct *tsk) { } |
22 | static inline void vtime_account_irq_enter(struct task_struct *tsk) { } |
23 | static inline bool vtime_accounting_enabled(void) { return false; } |
24 | #endif |
25 | |
26 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN |
27 | extern void arch_vtime_task_switch(struct task_struct *tsk); |
28 | extern void vtime_account_irq_exit(struct task_struct *tsk); |
29 | extern bool vtime_accounting_enabled(void); |
30 | extern void vtime_user_enter(struct task_struct *tsk); |
31 | static inline void vtime_user_exit(struct task_struct *tsk) |
32 | { |
33 | vtime_account_user(tsk); |
34 | } |
35 | extern void vtime_guest_enter(struct task_struct *tsk); |
36 | extern void vtime_guest_exit(struct task_struct *tsk); |
37 | extern void vtime_init_idle(struct task_struct *tsk); |
38 | #else |
39 | static inline void vtime_account_irq_exit(struct task_struct *tsk) |
40 | { |
41 | /* On hard|softirq exit we always account to hard|softirq cputime */ |
42 | vtime_account_system(tsk); |
43 | } |
44 | static inline void vtime_user_enter(struct task_struct *tsk) { } |
45 | static inline void vtime_user_exit(struct task_struct *tsk) { } |
46 | static inline void vtime_guest_enter(struct task_struct *tsk) { } |
47 | static inline void vtime_guest_exit(struct task_struct *tsk) { } |
48 | static inline void vtime_init_idle(struct task_struct *tsk) { } |
49 | #endif |
50 | |
51 | #ifdef CONFIG_IRQ_TIME_ACCOUNTING |
52 | extern void irqtime_account_irq(struct task_struct *tsk); |
53 | #else |
54 | static inline void irqtime_account_irq(struct task_struct *tsk) { } |
55 | #endif |
56 | |
57 | static inline void account_irq_enter_time(struct task_struct *tsk) |
58 | { |
59 | vtime_account_irq_enter(tsk); |
60 | irqtime_account_irq(tsk); |
61 | } |
62 | |
63 | static inline void account_irq_exit_time(struct task_struct *tsk) |
64 | { |
65 | vtime_account_irq_exit(tsk); |
66 | irqtime_account_irq(tsk); |
67 | } |
68 | |
69 | #endif /* _LINUX_KERNEL_VTIME_H */ |
70 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9