public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: a.othieno@bluewin.ch (Arthur Othieno)
To: akpm@osdl.org
Cc: chris@zankel.net, linux-kernel@vger.kernel.org
Subject: [PATCH] xtensa: struct semaphore.sleepers initialization
Date: Fri, 28 Oct 2005 23:29:16 -0400	[thread overview]
Message-ID: <20051029032916.GB1870@krypton> (raw)

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>

---

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

                 reply	other threads:[~2005-10-29  3:29 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051029032916.GB1870@krypton \
    --to=a.othieno@bluewin.ch \
    --cc=akpm@osdl.org \
    --cc=chris@zankel.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox