Skip to content

Commit

Permalink
sched: clarify ifdef tangle
Browse files Browse the repository at this point in the history
- 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: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Andrew Morton authored and Ingo Molnar committed Sep 23, 2008
1 parent caea8a0 commit 006c75f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

static void init_hrtick(void)
static inline void init_hrtick(void)
{
}
#endif /* CONFIG_SMP */
Expand All @@ -1121,7 +1121,7 @@ static void init_rq_hrtick(struct rq *rq)
rq->hrtick_timer.function = hrtick;
rq->hrtick_timer.cb_mode = HRTIMER_CB_IRQSAFE_NO_SOFTIRQ;
}
#else
#else /* CONFIG_SCHED_HRTICK */
static inline void hrtick_clear(struct rq *rq)
{
}
Expand All @@ -1133,7 +1133,7 @@ static inline void init_rq_hrtick(struct rq *rq)
static inline void init_hrtick(void)
{
}
#endif
#endif /* CONFIG_SCHED_HRTICK */

/*
* resched_task - mark a task 'to be rescheduled now'.
Expand Down

0 comments on commit 006c75f

Please sign in to comment.