diff options
Diffstat (limited to 'include/asm-alpha')
-rw-r--r-- | include/asm-alpha/barrier.h | 2 | ||||
-rw-r--r-- | include/asm-alpha/rwsem.h | 5 | ||||
-rw-r--r-- | include/asm-alpha/semaphore.h | 3 |
3 files changed, 7 insertions, 3 deletions
diff --git a/include/asm-alpha/barrier.h b/include/asm-alpha/barrier.h index 229c83fe77cb..681ff581afa5 100644 --- a/include/asm-alpha/barrier.h +++ b/include/asm-alpha/barrier.h | |||
@@ -1,6 +1,8 @@ | |||
1 | #ifndef __BARRIER_H | 1 | #ifndef __BARRIER_H |
2 | #define __BARRIER_H | 2 | #define __BARRIER_H |
3 | 3 | ||
4 | #include <asm/compiler.h> | ||
5 | |||
4 | #define mb() \ | 6 | #define mb() \ |
5 | __asm__ __volatile__("mb": : :"memory") | 7 | __asm__ __volatile__("mb": : :"memory") |
6 | 8 | ||
diff --git a/include/asm-alpha/rwsem.h b/include/asm-alpha/rwsem.h index 8e058a67c9a4..fafdd4f7010a 100644 --- a/include/asm-alpha/rwsem.h +++ b/include/asm-alpha/rwsem.h | |||
@@ -262,5 +262,10 @@ static inline long rwsem_atomic_update(long val, struct rw_semaphore *sem) | |||
262 | #endif | 262 | #endif |
263 | } | 263 | } |
264 | 264 | ||
265 | static inline int rwsem_is_locked(struct rw_semaphore *sem) | ||
266 | { | ||
267 | return (sem->count != 0); | ||
268 | } | ||
269 | |||
265 | #endif /* __KERNEL__ */ | 270 | #endif /* __KERNEL__ */ |
266 | #endif /* _ALPHA_RWSEM_H */ | 271 | #endif /* _ALPHA_RWSEM_H */ |
diff --git a/include/asm-alpha/semaphore.h b/include/asm-alpha/semaphore.h index eb2cbd97d404..1a6295f2c2d4 100644 --- a/include/asm-alpha/semaphore.h +++ b/include/asm-alpha/semaphore.h | |||
@@ -26,9 +26,6 @@ struct semaphore { | |||
26 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ | 26 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ |
27 | } | 27 | } |
28 | 28 | ||
29 | #define __MUTEX_INITIALIZER(name) \ | ||
30 | __SEMAPHORE_INITIALIZER(name,1) | ||
31 | |||
32 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 29 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
33 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 30 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
34 | 31 | ||