函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:mekeeping_resume - Resumes the generic timekeeping subsystem.

函数原型:void timekeeping_resume(void)

返回类型:void

参数:

1678  tk等于timekeeper
1679  clock等于clock
1683  bool inject_sleeptime = false
1685  ad_persistent_clock64 - Return time from the persistent clock.* Weak dummy function for arches that do not yet support it.* Reads the time from the battery backed persistent clock.* Returns a timespec with tv_sec=0 and tv_nsec=0 if unsupported.
1687  clockevents_resume()
1688  clocksource_resume()
1690  raw_spin_lock_irqsave( & timekeeper_lock, flags)
1691  write_seqcount_begin( & seq)
1705  cycle_now等于k_clock_read - atomic clocksource read() helper* This helper is necessary to use in the read paths because, while the* seqlock ensures we don't return a bad value while structures are updated,* it doesn't protect from potential crashes
1706  nsec等于locksource_stop_suspend_timing - Stop measuring the suspend timing*@cs: current clocksource from timekeeping*@cycle_now: current cycles from timekeeping* This function will calculate the suspend time from suspend timer.
1707  如果nsec大于0则
1708  ts_delta等于纳秒转换到64位timespec时间
1709  inject_sleeptime = true
1710  否则如果lhs < rhs: return <0* lhs == rhs: return 0* lhs > rhs: return >0大于0则
1711  ts_delta等于sub = lhs - rhs, in normalized form
1712  inject_sleeptime = true
1715  如果inject_sleeptime
1716  Flag reflecting whether timekeeping_resume() has injected sleeptime = false
1717  __timekeeping_inject_sleeptime - Internal function to add sleep interval*@delta: pointer to a timespec delta value* Takes a timespec offset measuring a suspend interval and properly* adds the sleep offset to the timekeeping variables.
1721  cycle_last等于cycle_now
1722  cycle_last等于cycle_now
1724  Difference between accumulated time and NTP time in ntp* shifted nano seconds. 等于0
1725  lag for if timekeeping is suspended 等于0
1726  must hold timekeeper_lock
1727  write_seqcount_end( & seq)
1728  raw_spin_unlock_irqrestore( & timekeeper_lock, flags)
1730  touch_softlockup_watchdog()
1732  tick_resume()
1733  During resume we might have to reprogram the high resolution timer* interrupt on all online CPUs. However, all other CPUs will be* stopped with IRQs interrupts disabled so the clock_was_set() call* must be deferred.