| From 8f63d975e850d7294619799d0775f0b033e07fca Mon Sep 17 00:00:00 2001 |
| From: Paul Gortmaker <paul.gortmaker@windriver.com> |
| 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 <paul.gortmaker@windriver.com> |
| |
| 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.1.1 |
| |