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:51
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:posix_cpu_timer_get

Proto:static void posix_cpu_timer_get(struct k_itimer *timer, struct itimerspec64 *itp)

Type:void

Parameter:

TypeParameterName
struct k_itimer *timer
struct itimerspec64 *itp
704  clkid = CPUCLOCK_WHICH(it_clock)
705  ctmr = cpu
706  expires = cpu_timer_getexpires(ctmr)
707  p = task
709  If WARN_ON_ONCE(!p) Then Return
715  it_interval = Map the ktime_t to timespec conversion to ns_to_timespec function (it_interval)
717  If Not expires Then Return
723  If CPUCLOCK_PERTHREAD(it_clock) Then
724  now = Sample a per-thread clock for the given task. clkid is validated.
725  Else
734  sighand = lock_task_sighand(p, & flags)
742  Return
743  Else
749  If now < expires Then
750  it_value = s_to_timespec64 - Convert nanoseconds to timespec64*@nsec: the nanoseconds value to be converted* Returns the timespec64 representation of the nsec parameter.
751  Else
756  nanoseconds = 1
757  seconds = 0