mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@mvista.com>
To: mingo@elte.hu
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] RT: __MUTEX_INITIALIZER for rt_mutex
Date: Wed, 21 Sep 2005 16:38:23 -0700	[thread overview]
Message-ID: <1127345903.19506.47.camel@dhcp153.mvista.com> (raw)


Add __MUTEX_INITIALIZER macro for rt_mutex types.

Signed-Off-By: Daniel Walker <dwalker@mvista.com>

Index: linux-2.6.13/include/linux/rt_lock.h
===================================================================
--- linux-2.6.13.orig/include/linux/rt_lock.h
+++ linux-2.6.13/include/linux/rt_lock.h
@@ -229,10 +229,12 @@ struct semaphore {
 	struct rt_mutex lock;
 };
 
-#define DECLARE_MUTEX(name) \
-struct semaphore name = \
+#define __MUTEX_INITIALIZER(name) \
 	{ .count = { 1 }, .lock = __RT_MUTEX_INITIALIZER(name.lock) }
 
+#define DECLARE_MUTEX(name) \
+struct semaphore name = __MUTEX_INITIALIZER(name)
+
 /*
  * DECLARE_MUTEX_LOCKED() is deprecated: very hard to initialize properly
  * and it also often signals abuse of semaphores. So we redirect it to



                 reply	other threads:[~2005-09-21 23:38 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=1127345903.19506.47.camel@dhcp153.mvista.com \
    --to=dwalker@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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

all inboxes | Powered by JetHome®