Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\posix-cpu-timers.c Create Date:2022-07-28 10:47:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:posix_cpu_clock_get

Proto:static int posix_cpu_clock_get(const clockid_t clock, struct timespec64 *tp)

Type:int

Parameter:

TypeParameterName
const clockid_tclock
struct timespec64 *tp
364  clkid = CPUCLOCK_WHICH(clock)
368  tsk = get_task_for_clock_get(clock)
369  If Not tsk Then Return -EINVAL
372  If CPUCLOCK_PERTHREAD(clock) Then t = Sample a per-thread clock for the given task. clkid is validated.
374  Else t = Sample a process (thread group) clock for the given task clkid. If the* group's cputime accounting is already enabled, read the atomic* store. Otherwise a full update is required. Task's sighand lock must be
376  put_task_struct(tsk)
378  tp = s_to_timespec64 - Convert nanoseconds to timespec64*@nsec: the nanoseconds value to be converted* Returns the timespec64 representation of the nsec parameter.
379  Return 0
Caller
NameDescribe
process_cpu_clock_get
thread_cpu_clock_get