[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: Arthur Othieno <a.othieno@bluewin.ch>
Acked-by: Christian Zankel <chris@zankel.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Arthur Othieno 2005-11-07 00:59:01 -08:00 коммит произвёл Linus Torvalds
Родитель 23f88fe4bf
Коммит aa3a6f456f
1 изменённых файлов: 1 добавлений и 0 удалений

Просмотреть файл

@ -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);
}