*参照元 [#zbc63c29]
#backlinks

*説明 [#h41be2e8]
-パス: [[linux-4.4.1/kernel/time/hrtimer.c]]

-FIXME: これは何?
--説明


**引数 [#zd02815e]
-struct hrtimer *timer
--
--[[linux-4.4.1/hrtimer]]
-struct hrtimer_clock_base *base
--
--[[linux-4.4.1/hrtimer_clock_base]]
-unsigned long newstate
--
-int reprogram
--


**返り値 [#r8e7cb72]
-なし


**参考 [#e9b366df]


*実装 [#k522e4c2]
 /*
  * __remove_hrtimer - internal function to remove a timer
  *
  * Caller must hold the base lock.
  *
  * High resolution timer mode reprograms the clock event device when the
  * timer is the one which expires next. The caller can disable this by setting
  * reprogram to zero. This is useful, when the context does a reprogramming
  * anyway (e.g. timer interrupt)
  */
 static void __remove_hrtimer(struct hrtimer *timer,
                              struct hrtimer_clock_base *base,
                              unsigned long newstate, int reprogram)
 {
         struct hrtimer_cpu_base *cpu_base = base->cpu_base;
         unsigned int state = timer->state;
 
-
--[[linux-4.4.1/hrtimer_cpu_base]]

         timer->state = newstate;
         if (!(state & HRTIMER_STATE_ENQUEUED))
                 return;
 
         if (!timerqueue_del(&base->active, &timer->node))
                 cpu_base->active_bases &= ~(1 << base->index);
 
-
--[[linux-4.4.1/timerqueue_del()]]

 #ifdef CONFIG_HIGH_RES_TIMERS
-
--[[linux-4.4.1/CONFIG_HIGH_RES_TIMERS]]

         /*
          * Note: If reprogram is false we do not update
          * cpu_base->next_timer. This happens when we remove the first
          * timer on a remote cpu. No harm as we never dereference
          * cpu_base->next_timer. So the worst thing what can happen is
          * an superflous call to hrtimer_force_reprogram() on the
          * remote cpu later on if the same timer gets enqueued again.
          */
         if (reprogram && timer == cpu_base->next_timer)
                 hrtimer_force_reprogram(cpu_base, 1);
-
--[[linux-4.4.1/hrtimer_force_reprogram()]]

 #endif
 }


*コメント [#j84a9499]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS