* [PATCH] RT: __MUTEX_INITIALIZER for rt_mutex
@ 2005-09-21 23:38 Daniel Walker
0 siblings, 0 replies; only message in thread
From: Daniel Walker @ 2005-09-21 23:38 UTC (permalink / raw)
To: mingo; +Cc: linux-kernel
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
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-21 23:38 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-21 23:38 [PATCH] RT: __MUTEX_INITIALIZER for rt_mutex Daniel Walker
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®