Messages in this thread Patch in this message | ![/](/images/icornerl.gif) | | Subject | [PATCH] RT: __MUTEX_INITIALIZER for rt_mutex | From | Daniel Walker <> | Date | Wed, 21 Sep 2005 16:38:23 -0700 |
| |
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
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| ![\](/images/icornerr.gif) |