summaryrefslogtreecommitdiffstats
path: root/semaphore-Add-DEFINE_SEMAPHORE.patch
blob: aa45d1cb3440da9ba670c3f1b26ec1a740faf789 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From 8496469ab4c117058f60b6780d6924b65bd07d2a 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>
---
 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