All of lore.kernel.org
 help / color / mirror / Atom feed
From: a.othieno@bluewin.ch (Arthur Othieno)
To: akpm@osdl.org
Cc: rmk@arm.linux.org.uk, linux-kernel@vger.kernel.org
Subject: [PATCH] arm: struct semaphore.sleepers initialization
Date: Fri, 28 Oct 2005 23:26:35 -0400	[thread overview]
Message-ID: <20051029032635.GA1870@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 (including arm26).

Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch>

---

 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)	\

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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-29  3:26 Arthur Othieno [this message]
2005-10-29  8:51 ` [PATCH] arm: struct semaphore.sleepers initialization Russell King

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=20051029032635.GA1870@krypton \
    --to=a.othieno@bluewin.ch \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rmk@arm.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.