Commit 8d8b9a2d authored by Andrey Panin's avatar Andrey Panin Committed by Linus Torvalds

[PATCH] add unlikely() into add_timer()

This micropatch adds unlikely() macro into add_timer() bug check code.
Without this path gcc 3.1 makes bad thing reordering printk() into
the middle of function body.
parent 2f07197e
...@@ -187,7 +187,7 @@ void add_timer(struct timer_list *timer) ...@@ -187,7 +187,7 @@ void add_timer(struct timer_list *timer)
unsigned long flags; unsigned long flags;
spin_lock_irqsave(&timerlist_lock, flags); spin_lock_irqsave(&timerlist_lock, flags);
if (timer_pending(timer)) if (unlikely(timer_pending(timer)))
goto bug; goto bug;
internal_add_timer(timer); internal_add_timer(timer);
spin_unlock_irqrestore(&timerlist_lock, flags); spin_unlock_irqrestore(&timerlist_lock, flags);
......
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