* [PATCH] arm: struct semaphore.sleepers initialization
@ 2005-10-29 3:26 Arthur Othieno
2005-10-29 8:51 ` Russell King
0 siblings, 1 reply; 2+ messages in thread
From: Arthur Othieno @ 2005-10-29 3:26 UTC (permalink / raw)
To: akpm; +Cc: rmk, linux-kernel
No one may sleep on us until we've been down()'d. So on allocation,
initialize `sleepers' to 0, just like everyone else (including arm26).
Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>
---
include/asm-arm/semaphore.h | 9 +++++----
1 files changed, 5 insertions(+), 4 deletions(-)
bbf19d06faa9dc51fe084cc8d0b7fac933771528
diff --git a/include/asm-arm/semaphore.h b/include/asm-arm/semaphore.h
--- a/include/asm-arm/semaphore.h
+++ b/include/asm-arm/semaphore.h
@@ -18,10 +18,11 @@ struct semaphore {
wait_queue_head_t wait;
};
-#define __SEMAPHORE_INIT(name, cnt) \
-{ \
- .count = ATOMIC_INIT(cnt), \
- .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
+#define __SEMAPHORE_INIT(name, cnt) \
+{ \
+ .count = ATOMIC_INIT(cnt), \
+ .sleepers = 0, \
+ .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
}
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-29 8:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-29 3:26 [PATCH] arm: struct semaphore.sleepers initialization Arthur Othieno
2005-10-29 8:51 ` Russell King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox