[PATCH] arm: struct semaphore.sleepers initialization

From: Arthur Othieno
Date: Fri Oct 28 2005 - 22:27:57 EST


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@xxxxxxxxxx>

---

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) \
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/