.. | .. |
---|
61 | 61 | * Thread group CPU time accounting. |
---|
62 | 62 | */ |
---|
63 | 63 | void thread_group_cputime(struct task_struct *tsk, struct task_cputime *times); |
---|
64 | | -void thread_group_cputimer(struct task_struct *tsk, struct task_cputime *times); |
---|
65 | | - |
---|
| 64 | +void thread_group_sample_cputime(struct task_struct *tsk, u64 *samples); |
---|
66 | 65 | |
---|
67 | 66 | /* |
---|
68 | 67 | * The following are functions that support scheduler-internal time accounting. |
---|
.. | .. |
---|
71 | 70 | */ |
---|
72 | 71 | |
---|
73 | 72 | /** |
---|
74 | | - * get_running_cputimer - return &tsk->signal->cputimer if cputimer is running |
---|
| 73 | + * get_running_cputimer - return &tsk->signal->cputimer if cputimers are active |
---|
75 | 74 | * |
---|
76 | 75 | * @tsk: Pointer to target task. |
---|
77 | 76 | */ |
---|
.. | .. |
---|
81 | 80 | { |
---|
82 | 81 | struct thread_group_cputimer *cputimer = &tsk->signal->cputimer; |
---|
83 | 82 | |
---|
84 | | - /* Check if cputimer isn't running. This is accessed without locking. */ |
---|
85 | | - if (!READ_ONCE(cputimer->running)) |
---|
| 83 | + /* |
---|
| 84 | + * Check whether posix CPU timers are active. If not the thread |
---|
| 85 | + * group accounting is not active either. Lockless check. |
---|
| 86 | + */ |
---|
| 87 | + if (!READ_ONCE(tsk->signal->posix_cputimers.timers_active)) |
---|
86 | 88 | return NULL; |
---|
87 | 89 | |
---|
88 | 90 | /* |
---|