Commit aa3a6f45 authored by Arthur Othieno's avatar Arthur Othieno Committed by Linus Torvalds

[PATCH] xtensa: struct semaphore.sleepers initialization

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: default avatarArthur Othieno <a.othieno@bluewin.ch>
Acked-by: default avatarChristian Zankel <chris@zankel.net>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 23f88fe4
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment