我是靠谱客的博主 自然洋葱,这篇文章主要介绍linux BOOTIME、MONOTONIC以及REALTIME之间的关系,现在分享给大家,希望可以做个参考。

HRTIMER_BASE_BOOTTIME=

HRTIMER_BASE_MONOTONIC+timekeeper.total_sleep_time=

HRTIMER_BASE_REALTIME+timekeeper.wall_to_monotonic+timekeeper.total_sleep_time=

timekeeper.xtime+timekeeper.wall_to_monotonic+timekeeper.total_sleep_time

 

static void hrtimer_get_softirq_time(struct hrtimer_cpu_base *base)
{
  ktime_t xtim, mono, boot;
  struct timespec xts, tom, slp;

  get_xtime_and_monotonic_and_sleep_offset(&xts, &tom, &slp);

  xtim = timespec_to_ktime(xts);
  mono = ktime_add(xtim, timespec_to_ktime(tom));
  boot = ktime_add(mono, timespec_to_ktime(slp));
  base->clock_base[HRTIMER_BASE_REALTIME].softirq_time = xtim;
  base->clock_base[HRTIMER_BASE_MONOTONIC].softirq_time = mono;
  base->clock_base[HRTIMER_BASE_BOOTTIME].softirq_time = boot;
}

最后

以上就是自然洋葱最近收集整理的关于linux BOOTIME、MONOTONIC以及REALTIME之间的关系的全部内容,更多相关linux内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(134)

评论列表共有 0 条评论

立即
投稿
返回
顶部