thread_group_start_cputime(9)
π NAME π
okay bestie, welcome to the Kernel API Manual corner for thread_group_start_cputime β aka the function that starts cputime and returns a sample. periodt. β¨
β¨ SYNOPSIS β¨
void thread_group_start_cputime (struct task_struct *tsk , u64 *samples
);
π ARGUMENTS π
tskβ the task for which cputime needs to be started. π«Άsamplesβ storage for time samples. π
π§ DESCRIPTION π§
okay so hereβs the tea β: the thread group cputime accounting is avoided when there are no posix CPU timers armed. no timers armed, no accounting, iykyk. π
Before starting a timer, itβs required to check whether the time accounting is active. If itβs not active, a full update of the atomic accounting store needs to be done, and the accounting enabled. literally required, bestie. π₯
Then it updates the times with an uptodate sample of the thread group cputimes. slay. β¨
π₯ SEE ALSO π₯
- Kernel file
./kernel/time/posix-cpu-timers.cπ¦ thread_group_sample_cputime(9),task_cputimers_expired(9),fastpath_timer_check(9)β the whole friend group. π
π sign-off time, bestie: from the Kernel API Manual, source ./kernel/time, dated October 2026, page thread_group_start_cputime(9). go read the kernel source, itβs giving main character energy π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms