From 8496469ab4c117058f60b6780d6924b65bd07d2a Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Sun, 23 Jan 2011 22:23:53 +0200 Subject: [PATCH] semaphore: Add DEFINE_SEMAPHORE part of commit a33fbe40ed7273fec10f718ada2304ecbb4262f7 in tip, which added the DEFINE_SEMAPHORE, combined with the 33rt merge commit 5f854cfc024622e4 that added "val" as an arg. The rest of a33fb added temporary semaphore_init shims to handle legacy code that wasn't cleaned up yet. They are no longer required. Signed-off-by: Paul Gortmaker --- 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 7415839..b3669e8 100644 --- a/include/linux/semaphore.h +++ b/include/linux/semaphore.h @@ -26,6 +26,9 @@ struct semaphore { .wait_list = LIST_HEAD_INIT((name).wait_list), \ } +#define DEFINE_SEMAPHORE(name, val) \ + struct semaphore name = __SEMAPHORE_INITIALIZER(name, val) + #define DECLARE_MUTEX(name) \ struct semaphore name = __SEMAPHORE_INITIALIZER(name, 1) -- 1.7.0.4