Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:set_normalized_timespec - set timespec sec and nsec parts and normalize*@ts: pointer to timespec variable to be set*@sec: seconds to set*@nsec: nanoseconds to set* Set seconds and nanoseconds field of a timespec variable and* normalize to the timespec

Proto:void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec)

Type:void

Parameter:

TypeParameterName
struct timespec64 *ts
time64_tsec
s64nsec
523  When nsec >= NSEC_PER_SEC cycle
529  asm("":"+rm"(nsec))
530  nsec -= NSEC_PER_SEC
531  ++sec
533  When nsec < 0 cycle
534  asm("":"+rm"(nsec))
535  nsec += NSEC_PER_SEC
536  --sec
538  seconds = sec
539  nanoseconds = nsec
Caller
NameDescribe
timespec64_add_safeAdd two timespec64 values and do a safety check for overflow.* It's assumed that both values are valid (>= 0).* And, each timespec64 is in normalized form.
tk_set_wall_to_mono
ktime_get_coarse_ts64