Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:do_clock_gettime

Proto:int do_clock_gettime(clockid_t which_clock, struct timespec64 *tp)

Type:int

Parameter:

TypeParameterName
clockid_twhich_clock
struct timespec64 *tp
75  Case which_clock == The IDs of the various system clocks (for POSIX.1b interval timers):
76  ktime_get_real_ts64 - Returns the time of day in a timespec64.*@ts: pointer to the timespec to be set* Returns the time of day in a timespec64 (WARN if suspended).
77  Break
78  Case which_clock == CLOCK_MONOTONIC
79  ktime_get_ts64 - get the monotonic clock in timespec64 format*@ts: pointer to timespec variable* The function calculates the monotonic clock from the realtime* clock and the wall_to_monotonic offset and stores the result
80  Break
81  Case which_clock == CLOCK_BOOTTIME
82  mespec64/time64_t interfaces utilizing the ktime based ones* for API completeness, these could be implemented more efficiently* if needed.
83  Break
84  Default
85  Return -EINVAL
88  Return 0
Caller
NameDescribe
SYSCALL_DEFINE2