diff options
author | Adrian Bunk <bunk@stusta.de> | 2007-07-31 03:38:19 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-31 18:39:39 -0400 |
commit | 99eb8a550dbccc0e1f6c7e866fe421810e0585f6 (patch) | |
tree | 130c6e3338a0655ba74355eba83afab9261e1ed0 /include/asm-arm26/semaphore.h | |
parent | 0d0ed42e5ca2e22465c591341839c18025748fe8 (diff) |
Remove the arm26 port
The arm26 port has been in a state where it was far from even compiling
for quite some time.
Ian Molton agreed with the removal.
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Cc: Ian Molton <spyro@f2s.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/asm-arm26/semaphore.h')
-rw-r--r-- | include/asm-arm26/semaphore.h | 100 |
1 files changed, 0 insertions, 100 deletions
diff --git a/include/asm-arm26/semaphore.h b/include/asm-arm26/semaphore.h deleted file mode 100644 index 1fda54375ed8..000000000000 --- a/include/asm-arm26/semaphore.h +++ /dev/null | |||
@@ -1,100 +0,0 @@ | |||
1 | /* | ||
2 | * linux/include/asm-arm26/semaphore.h | ||
3 | */ | ||
4 | #ifndef __ASM_ARM_SEMAPHORE_H | ||
5 | #define __ASM_ARM_SEMAPHORE_H | ||
6 | |||
7 | #include <linux/linkage.h> | ||
8 | #include <linux/spinlock.h> | ||
9 | #include <linux/wait.h> | ||
10 | #include <linux/rwsem.h> | ||
11 | |||
12 | #include <asm/atomic.h> | ||
13 | #include <asm/locks.h> | ||
14 | |||
15 | struct semaphore { | ||
16 | atomic_t count; | ||
17 | int sleepers; | ||
18 | wait_queue_head_t wait; | ||
19 | }; | ||
20 | |||
21 | #define __SEMAPHORE_INIT(name, n) \ | ||
22 | { \ | ||
23 | .count = ATOMIC_INIT(n), \ | ||
24 | .sleepers = 0, \ | ||
25 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait), \ | ||
26 | } | ||
27 | |||
28 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | ||
29 | struct semaphore name = __SEMAPHORE_INIT(name,count) | ||
30 | |||
31 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) | ||
32 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) | ||
33 | |||
34 | static inline void sema_init(struct semaphore *sem, int val) | ||
35 | { | ||
36 | atomic_set(&sem->count, val); | ||
37 | sem->sleepers = 0; | ||
38 | init_waitqueue_head(&sem->wait); | ||
39 | } | ||
40 | |||
41 | static inline void init_MUTEX(struct semaphore *sem) | ||
42 | { | ||
43 | sema_init(sem, 1); | ||
44 | } | ||
45 | |||
46 | static inline void init_MUTEX_LOCKED(struct semaphore *sem) | ||
47 | { | ||
48 | sema_init(sem, 0); | ||
49 | } | ||
50 | |||
51 | /* | ||
52 | * special register calling convention | ||
53 | */ | ||
54 | asmlinkage void __down_failed(void); | ||
55 | asmlinkage int __down_interruptible_failed(void); | ||
56 | asmlinkage int __down_trylock_failed(void); | ||
57 | asmlinkage void __up_wakeup(void); | ||
58 | |||
59 | extern void __down(struct semaphore * sem); | ||
60 | extern int __down_interruptible(struct semaphore * sem); | ||
61 | extern int __down_trylock(struct semaphore * sem); | ||
62 | extern void __up(struct semaphore * sem); | ||
63 | |||
64 | /* | ||
65 | * This is ugly, but we want the default case to fall through. | ||
66 | * "__down" is the actual routine that waits... | ||
67 | */ | ||
68 | static inline void down(struct semaphore * sem) | ||
69 | { | ||
70 | might_sleep(); | ||
71 | __down_op(sem, __down_failed); | ||
72 | } | ||
73 | |||
74 | /* | ||
75 | * This is ugly, but we want the default case to fall through. | ||
76 | * "__down_interruptible" is the actual routine that waits... | ||
77 | */ | ||
78 | static inline int down_interruptible (struct semaphore * sem) | ||
79 | { | ||
80 | might_sleep(); | ||
81 | return __down_op_ret(sem, __down_interruptible_failed); | ||
82 | } | ||
83 | |||
84 | static inline int down_trylock(struct semaphore *sem) | ||
85 | { | ||
86 | return __down_op_ret(sem, __down_trylock_failed); | ||
87 | } | ||
88 | |||
89 | /* | ||
90 | * Note! This is subtle. We jump to wake people up only if | ||
91 | * the semaphore was negative (== somebody was waiting on it). | ||
92 | * The default case (no contention) will result in NO | ||
93 | * jumps for both down() and up(). | ||
94 | */ | ||
95 | static inline void up(struct semaphore * sem) | ||
96 | { | ||
97 | __up_op(sem, __up_wakeup); | ||
98 | } | ||
99 | |||
100 | #endif | ||