sched: micro-optimize mmdrop()

micro-optimize mmdrop(). Improves schedule()'s assembly a bit.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
Ingo Molnar 2007-07-09 18:52:01 +02:00
parent 9c4801cebc
commit 6fb43d7b50

View file

@ -1514,7 +1514,7 @@ extern struct mm_struct * mm_alloc(void);
extern void FASTCALL(__mmdrop(struct mm_struct *));
static inline void mmdrop(struct mm_struct * mm)
{
if (atomic_dec_and_test(&mm->mm_count))
if (unlikely(atomic_dec_and_test(&mm->mm_count)))
__mmdrop(mm);
}