[PATCH] semaphore: Remove __MUTEX_INITIALIZER()
__MUTEX_INITIALIZER() has no users, and equates to the more commonly used DECLARE_MUTEX(), thus making it pretty much redundant. Remove it for good. Signed-off-by: Arthur Othieno <a.othieno@bluewin.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Родитель
d269cdd0e2
Коммит
727a53bd53
|
@ -26,9 +26,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) __SEMAPHORE_INIT(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INIT(name,count)
|
struct semaphore name = __SEMAPHORE_INIT(name,count)
|
||||||
|
|
||||||
|
|
|
@ -25,9 +25,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INIT(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INIT(name,count)
|
struct semaphore name = __SEMAPHORE_INIT(name,count)
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -47,9 +47,6 @@ struct semaphore {
|
||||||
#define __SEMAPHORE_INITIALIZER(name,count) \
|
#define __SEMAPHORE_INITIALIZER(name,count) \
|
||||||
{ count, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) __SEM_DEBUG_INIT(name) }
|
{ count, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) __SEM_DEBUG_INIT(name) }
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -55,9 +55,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -24,8 +24,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) __SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name, count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name, count)
|
||||||
|
|
||||||
|
|
|
@ -32,9 +32,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -36,9 +36,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -35,9 +35,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -45,9 +45,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name, 1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -49,9 +49,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -37,9 +37,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name, 1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -31,9 +31,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name, 1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,6 @@ struct semaphore {
|
||||||
#define __SEMAPHORE_INITIALIZER(name,count) \
|
#define __SEMAPHORE_INITIALIZER(name,count) \
|
||||||
{ ATOMIC_INIT(count), __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) }
|
{ ATOMIC_INIT(count), __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) }
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -33,9 +33,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -40,9 +40,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -22,9 +22,6 @@ struct semaphore {
|
||||||
{ ATOMIC_INIT(count), \
|
{ ATOMIC_INIT(count), \
|
||||||
__WAIT_QUEUE_HEAD_INITIALIZER((name).wait) }
|
__WAIT_QUEUE_HEAD_INITIALIZER((name).wait) }
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name, 1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name, count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,6 @@ struct semaphore {
|
||||||
{ ATOMIC_INIT (count), 0, \
|
{ ATOMIC_INIT (count), 0, \
|
||||||
__WAIT_QUEUE_HEAD_INITIALIZER ((name).wait) }
|
__WAIT_QUEUE_HEAD_INITIALIZER ((name).wait) }
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER (name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER (name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER (name,count)
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name,1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
|
@ -29,9 +29,6 @@ struct semaphore {
|
||||||
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
.wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define __MUTEX_INITIALIZER(name) \
|
|
||||||
__SEMAPHORE_INITIALIZER(name, 1)
|
|
||||||
|
|
||||||
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
#define __DECLARE_SEMAPHORE_GENERIC(name,count) \
|
||||||
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче