From: Jerry Pei Date: Thu, 22 Dec 2011 03:55:03 +0100 Subject: [PATCH] take back DECLARE_MUTEX for linx Signed-off-by: Jerry Pei --- include/linux/semaphore.h | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/include/linux/semaphore.h b/include/linux/semaphore.h index 66d2591..8b75bb6 100644 --- a/include/linux/semaphore.h +++ b/include/linux/semaphore.h @@ -29,6 +29,9 @@ struct semaphore { #define DEFINE_SEMAPHORE(name, val) \ struct semaphore name = __SEMAPHORE_INITIALIZER(name, val) +#define DECLARE_MUTEX(name) \ + struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) + static inline void sema_init(struct semaphore *sem, int val) { static struct lock_class_key __key; -- 1.7.5.4