Commit 006c75f1 authored by Andrew Morton's avatar Andrew Morton Committed by Ingo Molnar

sched: clarify ifdef tangle

- Add some comments to try to make the ifdef puzzle a bit clearer

- Explicitly inline one of the three init_hrtick() implementations.
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent caea8a03
...@@ -1102,7 +1102,7 @@ static void hrtick_start(struct rq *rq, u64 delay) ...@@ -1102,7 +1102,7 @@ static void hrtick_start(struct rq *rq, u64 delay)
hrtimer_start(&rq->hrtick_timer, ns_to_ktime(delay), HRTIMER_MODE_REL); hrtimer_start(&rq->hrtick_timer, ns_to_ktime(delay), HRTIMER_MODE_REL);
} }
static void init_hrtick(void) static inline void init_hrtick(void)
{ {
} }
#endif /* CONFIG_SMP */ #endif /* CONFIG_SMP */
...@@ -1121,7 +1121,7 @@ static void init_rq_hrtick(struct rq *rq) ...@@ -1121,7 +1121,7 @@ static void init_rq_hrtick(struct rq *rq)
rq->hrtick_timer.function = hrtick; rq->hrtick_timer.function = hrtick;
rq->hrtick_timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_SOFTIRQ; rq->hrtick_timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_SOFTIRQ;
} }
#else #else /* CONFIG_SCHED_HRTICK */
static inline void hrtick_clear(struct rq *rq) static inline void hrtick_clear(struct rq *rq)
{ {
} }
...@@ -1133,7 +1133,7 @@ static inline void init_rq_hrtick(struct rq *rq) ...@@ -1133,7 +1133,7 @@ static inline void init_rq_hrtick(struct rq *rq)
static inline void init_hrtick(void) static inline void init_hrtick(void)
{ {
} }
#endif #endif /* CONFIG_SCHED_HRTICK */
/* /*
* resched_task - mark a task 'to be rescheduled now'. * resched_task - mark a task 'to be rescheduled now'.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment