diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-07-09 18:52:01 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2007-07-09 18:52:01 +0200 |
commit | 6fb43d7b50e49a36f8be3199141bec473e5ecb00 (patch) | |
tree | f63f0a9b8279dcd6cd4acf9e99b88d9c60d95c61 /include/linux/sched.h | |
parent | 9c4801cebc2add1fe514bc8eb201b16372eee11a (diff) | |
download | blackbird-op-linux-6fb43d7b50e49a36f8be3199141bec473e5ecb00.tar.gz blackbird-op-linux-6fb43d7b50e49a36f8be3199141bec473e5ecb00.zip |
sched: micro-optimize mmdrop()
micro-optimize mmdrop(). Improves schedule()'s assembly a bit.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'include/linux/sched.h')
-rw-r--r-- | include/linux/sched.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index 785ec8465bd3..cfb680585ab8 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h @@ -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); } |