[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:
Arthur Othieno 2005-10-30 15:03:14 -08:00 коммит произвёл Linus Torvalds
Родитель d269cdd0e2
Коммит 727a53bd53
23 изменённых файлов: 0 добавлений и 67 удалений

Просмотреть файл

@ -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)