aboutsummaryrefslogtreecommitdiff
path: root/arch/alpha
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2009-07-26 15:35:40 +0200
committerSteven Rostedt <rostedt@goodmis.org>2011-11-14 12:11:04 -0500
commitce8d1a0f7e5df7ff79228395f4f985dbb4c20123 (patch)
treec38f1eb1fe23fec379357b583101d76e49e5ddc9 /arch/alpha
parentc4d6df6e24b8f45124681fec5700d3c7598885fa (diff)
rw_semaphores: Add rw_anon_semaphores
Most of the rw_semaphores have struct owner semantics. i_alloc_sem and xfs mr_lock are used as both semaphores and completions. That makes it hard to convert for preempt-rt. Add an rw_anon_semaphores type which is not converted on -rt. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/include/asm/rwsem.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/alpha/include/asm/rwsem.h b/arch/alpha/include/asm/rwsem.h
index a83bbea62c67..0f880ca8e036 100644
--- a/arch/alpha/include/asm/rwsem.h
+++ b/arch/alpha/include/asm/rwsem.h
@@ -21,7 +21,7 @@
#define RWSEM_ACTIVE_READ_BIAS RWSEM_ACTIVE_BIAS
#define RWSEM_ACTIVE_WRITE_BIAS (RWSEM_WAITING_BIAS + RWSEM_ACTIVE_BIAS)
-static inline void __down_read(struct rw_semaphore *sem)
+static inline void __down_read(struct rw_anon_semaphore *sem)
{
long oldcount;
#ifndef CONFIG_SMP
@@ -48,7 +48,7 @@ static inline void __down_read(struct rw_semaphore *sem)
/*
* trylock for reading -- returns 1 if successful, 0 if contention
*/
-static inline int __down_read_trylock(struct rw_semaphore *sem)
+static inline int __down_read_trylock(struct rw_anon_semaphore *sem)
{
long old, new, res;
@@ -63,7 +63,7 @@ static inline int __down_read_trylock(struct rw_semaphore *sem)
return res >= 0 ? 1 : 0;
}
-static inline void __down_write(struct rw_semaphore *sem)
+static inline void __down_write(struct rw_anon_semaphore *sem)
{
long oldcount;
#ifndef CONFIG_SMP
@@ -90,7 +90,7 @@ static inline void __down_write(struct rw_semaphore *sem)
/*
* trylock for writing -- returns 1 if successful, 0 if contention
*/
-static inline int __down_write_trylock(struct rw_semaphore *sem)
+static inline int __down_write_trylock(struct rw_anon_semaphore *sem)
{
long ret = cmpxchg(&sem->count, RWSEM_UNLOCKED_VALUE,
RWSEM_ACTIVE_WRITE_BIAS);
@@ -99,7 +99,7 @@ static inline int __down_write_trylock(struct rw_semaphore *sem)
return 0;
}
-static inline void __up_read(struct rw_semaphore *sem)
+static inline void __up_read(struct rw_anon_semaphore *sem)
{
long oldcount;
#ifndef CONFIG_SMP
@@ -124,7 +124,7 @@ static inline void __up_read(struct rw_semaphore *sem)
rwsem_wake(sem);
}
-static inline void __up_write(struct rw_semaphore *sem)
+static inline void __up_write(struct rw_anon_semaphore *sem)
{
long count;
#ifndef CONFIG_SMP
@@ -153,7 +153,7 @@ static inline void __up_write(struct rw_semaphore *sem)
/*
* downgrade write lock to read lock
*/
-static inline void __downgrade_write(struct rw_semaphore *sem)
+static inline void __downgrade_write(struct rw_anon_semaphore *sem)
{
long oldcount;
#ifndef CONFIG_SMP
@@ -177,7 +177,7 @@ static inline void __downgrade_write(struct rw_semaphore *sem)
rwsem_downgrade_wake(sem);
}
-static inline void rwsem_atomic_add(long val, struct rw_semaphore *sem)
+static inline void rwsem_atomic_add(long val, struct rw_anon_semaphore *sem)
{
#ifndef CONFIG_SMP
sem->count += val;
@@ -196,7 +196,7 @@ static inline void rwsem_atomic_add(long val, struct rw_semaphore *sem)
#endif
}
-static inline long rwsem_atomic_update(long val, struct rw_semaphore *sem)
+static inline long rwsem_atomic_update(long val, struct rw_anon_semaphore *sem)
{
#ifndef CONFIG_SMP
sem->count += val;