函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\time\time.c Create Date:2022-07-27 11:38:15
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称: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

函数原型:void set_normalized_timespec64(struct timespec64 *ts, time64_t sec, s64 nsec)

返回类型:void

参数:

类型参数名称
struct timespec64 *ts
time64_tsec
s64nsec
523 nsec大于等于NSEC_PER_SEC循环
529  asm("":"+rm"(nsec))
530  nsec减等于NSEC_PER_SEC
531  sec先自加
533 nsec小于0循环
534  asm("":"+rm"(nsec))
535  nsec加等于NSEC_PER_SEC
536  sec先自减
538  seconds 等于sec
539  nanoseconds 等于nsec
调用者
名称描述
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
pvclock_read_wallclock