Commit 3f33a7ce authored by Roel Kluin's avatar Roel Kluin Committed by Ingo Molnar

sched: unite unlikely pairs in rt_policy() and schedule_debug()

Removes obfuscation and may improve assembly.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Signed-off-by: default avatarIngo Molnar <mingo@elte.hu>
parent f9305d4a
...@@ -136,7 +136,7 @@ static inline void sg_inc_cpu_power(struct sched_group *sg, u32 val) ...@@ -136,7 +136,7 @@ static inline void sg_inc_cpu_power(struct sched_group *sg, u32 val)
static inline int rt_policy(int policy) static inline int rt_policy(int policy)
{ {
if (unlikely(policy == SCHED_FIFO) || unlikely(policy == SCHED_RR)) if (unlikely(policy == SCHED_FIFO || policy == SCHED_RR))
return 1; return 1;
return 0; return 0;
} }
...@@ -4433,7 +4433,7 @@ static inline void schedule_debug(struct task_struct *prev) ...@@ -4433,7 +4433,7 @@ static inline void schedule_debug(struct task_struct *prev)
* schedule() atomically, we ignore that path for now. * schedule() atomically, we ignore that path for now.
* Otherwise, whine if we are scheduling when we should not be. * Otherwise, whine if we are scheduling when we should not be.
*/ */
if (unlikely(in_atomic_preempt_off()) && unlikely(!prev->exit_state)) if (unlikely(in_atomic_preempt_off() && !prev->exit_state))
__schedule_bug(prev); __schedule_bug(prev);
profile_hit(SCHED_PROFILING, __builtin_return_address(0)); profile_hit(SCHED_PROFILING, __builtin_return_address(0));
......
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