[PATCH] xtensa: struct semaphore.sleepers initialization
From: Arthur Othieno
Date: Fri Oct 28 2005 - 22:29:51 EST
No one may sleep on us until we've been down()'d. So on allocation,
initialize `sleepers' to 0, just like everyone else does.
Signed-off-by: Arthur Othieno <a.othieno@xxxxxxxxxx>
---
include/asm-xtensa/semaphore.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
30304537ba5143b13071e4d62ecbd1edcf526f41
diff --git a/include/asm-xtensa/semaphore.h b/include/asm-xtensa/semaphore.h
--- a/include/asm-xtensa/semaphore.h
+++ b/include/asm-xtensa/semaphore.h
@@ -38,6 +38,7 @@ struct semaphore {
static inline void sema_init (struct semaphore *sem, int val)
{
atomic_set(&sem->count, val);
+ sem->sleepers = 0;
init_waitqueue_head(&sem->wait);
}
-
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/