Function report |
Source Code:kernel\time\timekeeping.c |
Create Date:2022-07-28 10:42:50 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:logarithmic_accumulation - shifted accumulation of cycles* This functions accumulates a shifted interval of cycles into* into a shifted interval nanoseconds. Allows for O(log) accumulation* loop.* Returns the unconsumed cycles.
Proto:static u64 logarithmic_accumulation(struct timekeeper *tk, u64 offset, unsigned int shift, unsigned int *clock_set)
Type:u64
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct timekeeper * | tk | |
| u64 | offset | |
| unsigned int | shift | |
| unsigned int * | clock_set |
| 2022 | cycle_last += interval |
| 2023 | cycle_last += interval |
| 2025 | xtime_nsec += xtime_interval << shift |
| 2029 | xtime_nsec += raw_interval << shift |
| 2030 | snsec_per_sec = NSEC_PER_SEC << shift |
| 2031 | When xtime_nsec >= snsec_per_sec cycle |
| 2032 | xtime_nsec -= snsec_per_sec |
| 2033 | raw_sec++ |
| 2038 | Difference between accumulated time and NTP time in ntp* shifted nano seconds. -= xtime_interval + xtime_remainder << ntp_error_shift + shift |
| 2041 | Return offset |
| Name | Describe |
|---|---|
| timekeeping_advance | mekeeping_advance - Updates the timekeeper to the current time and* current NTP tick length |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |