projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3219445
)
semaphore: __down_common: use signal_pending_state()
author
Oleg Nesterov
<
[email protected]
>
Tue, 5 Aug 2008 20:01:13 +0000
(13:01 -0700)
committer
Linus Torvalds
<
[email protected]
>
Tue, 5 Aug 2008 21:33:47 +0000
(14:33 -0700)
Change __down_common() to use signal_pending_state() instead of open
coding.
The changes in kernel/semaphore.o are just artifacts, the state checks are
optimized away.
Signed-off-by: Oleg Nesterov <
[email protected]
>
Cc: Ingo Molnar <
[email protected]
>
Cc: Matthew Wilcox <
[email protected]
>
Cc: Roland McGrath <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
kernel/semaphore.c
patch
|
blob
|
history
diff --git
a/kernel/semaphore.c
b/kernel/semaphore.c
index aaaeae8244e77aa7dffd26ff935e7e3260c58a97..94a62c0d4ade651b8c4e2a5c7cbb8ff26110738f 100644
(file)
--- a/
kernel/semaphore.c
+++ b/
kernel/semaphore.c
@@
-212,9
+212,7
@@
static inline int __sched __down_common(struct semaphore *sem, long state,
waiter.up = 0;
for (;;) {
- if (state == TASK_INTERRUPTIBLE && signal_pending(task))
- goto interrupted;
- if (state == TASK_KILLABLE && fatal_signal_pending(task))
+ if (signal_pending_state(state, task))
goto interrupted;
if (timeout <= 0)
goto timed_out;