OSDN Git Service
(root)
/
sagit-ice-cold
/
kernel_xiaomi_msm8998.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
97439d0
)
semaphore: use unlikely() for down's timeout
author
liguang
<lig.fnst@cn.fujitsu.com>
Tue, 30 Apr 2013 22:28:32 +0000
(15:28 -0700)
committer
Linus Torvalds
<torvalds@linux-foundation.org>
Wed, 1 May 2013 00:04:08 +0000
(17:04 -0700)
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/semaphore.c
patch
|
blob
|
history
diff --git
a/kernel/semaphore.c
b/kernel/semaphore.c
index
4567fc0
..
9c7017d
100644
(file)
--- a/
kernel/semaphore.c
+++ b/
kernel/semaphore.c
@@
-214,7
+214,7
@@
static inline int __sched __down_common(struct semaphore *sem, long state,
for (;;) {
if (signal_pending_state(state, task))
goto interrupted;
- if (
timeout <= 0
)
+ if (
unlikely(timeout <= 0)
)
goto timed_out;
__set_task_state(task, state);
raw_spin_unlock_irq(&sem->lock);