summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/rwsem-spinlock.h14
-rw-r--r--include/linux/rwsem.h24
2 files changed, 1 insertions, 37 deletions
diff --git a/include/linux/rwsem-spinlock.h b/include/linux/rwsem-spinlock.h
index f30f805080ae..d68afcc36ac9 100644
--- a/include/linux/rwsem-spinlock.h
+++ b/include/linux/rwsem-spinlock.h
@@ -32,22 +32,10 @@ struct rw_semaphore {
__s32 activity;
spinlock_t wait_lock;
struct list_head wait_list;
-#if RWSEM_DEBUG
- int debug;
-#endif
};
-/*
- * initialisation
- */
-#if RWSEM_DEBUG
-#define __RWSEM_DEBUG_INIT , 0
-#else
-#define __RWSEM_DEBUG_INIT /* */
-#endif
-
#define __RWSEM_INITIALIZER(name) \
-{ 0, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) __RWSEM_DEBUG_INIT }
+{ 0, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) }
#define DECLARE_RWSEM(name) \
struct rw_semaphore name = __RWSEM_INITIALIZER(name)
diff --git a/include/linux/rwsem.h b/include/linux/rwsem.h
index f99fe90732ab..93581534b915 100644
--- a/include/linux/rwsem.h
+++ b/include/linux/rwsem.h
@@ -9,8 +9,6 @@
#include <linux/linkage.h>
-#define RWSEM_DEBUG 0
-
#ifdef __KERNEL__
#include <linux/types.h>
@@ -26,23 +24,13 @@ struct rw_semaphore;
#include <asm/rwsem.h> /* use an arch-specific implementation */
#endif
-#ifndef rwsemtrace
-#if RWSEM_DEBUG
-extern void FASTCALL(rwsemtrace(struct rw_semaphore *sem, const char *str));
-#else
-#define rwsemtrace(SEM,FMT)
-#endif
-#endif
-
/*
* lock for reading
*/
static inline void down_read(struct rw_semaphore *sem)
{
might_sleep();
- rwsemtrace(sem,"Entering down_read");
__down_read(sem);
- rwsemtrace(sem,"Leaving down_read");
}
/*
@@ -51,9 +39,7 @@ static inline void down_read(struct rw_semaphore *sem)
static inline int down_read_trylock(struct rw_semaphore *sem)
{
int ret;
- rwsemtrace(sem,"Entering down_read_trylock");
ret = __down_read_trylock(sem);
- rwsemtrace(sem,"Leaving down_read_trylock");
return ret;
}
@@ -63,9 +49,7 @@ static inline int down_read_trylock(struct rw_semaphore *sem)
static inline void down_write(struct rw_semaphore *sem)
{
might_sleep();
- rwsemtrace(sem,"Entering down_write");
__down_write(sem);
- rwsemtrace(sem,"Leaving down_write");
}
/*
@@ -74,9 +58,7 @@ static inline void down_write(struct rw_semaphore *sem)
static inline int down_write_trylock(struct rw_semaphore *sem)
{
int ret;
- rwsemtrace(sem,"Entering down_write_trylock");
ret = __down_write_trylock(sem);
- rwsemtrace(sem,"Leaving down_write_trylock");
return ret;
}
@@ -85,9 +67,7 @@ static inline int down_write_trylock(struct rw_semaphore *sem)
*/
static inline void up_read(struct rw_semaphore *sem)
{
- rwsemtrace(sem,"Entering up_read");
__up_read(sem);
- rwsemtrace(sem,"Leaving up_read");
}
/*
@@ -95,9 +75,7 @@ static inline void up_read(struct rw_semaphore *sem)
*/
static inline void up_write(struct rw_semaphore *sem)
{
- rwsemtrace(sem,"Entering up_write");
__up_write(sem);
- rwsemtrace(sem,"Leaving up_write");
}
/*
@@ -105,9 +83,7 @@ static inline void up_write(struct rw_semaphore *sem)
*/
static inline void downgrade_write(struct rw_semaphore *sem)
{
- rwsemtrace(sem,"Entering downgrade_write");
__downgrade_write(sem);
- rwsemtrace(sem,"Leaving downgrade_write");
}
#endif /* __KERNEL__ */