thread_group_start_cputime(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ 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 πŸ”₯


πŸ’– 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