diff options
Diffstat (limited to 'include/asm-cris/semaphore.h')
-rw-r--r-- | include/asm-cris/semaphore.h | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/include/asm-cris/semaphore.h b/include/asm-cris/semaphore.h index 39faf69bcf76..53f548b791c1 100644 --- a/include/asm-cris/semaphore.h +++ b/include/asm-cris/semaphore.h | |||
@@ -18,8 +18,6 @@ | |||
18 | * CRIS semaphores, implemented in C-only so far. | 18 | * CRIS semaphores, implemented in C-only so far. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | int printk(const char *fmt, ...); | ||
22 | |||
23 | struct semaphore { | 21 | struct semaphore { |
24 | atomic_t count; | 22 | atomic_t count; |
25 | atomic_t waking; | 23 | atomic_t waking; |
@@ -39,17 +37,17 @@ struct semaphore { | |||
39 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) | 37 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) |
40 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) | 38 | #define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) |
41 | 39 | ||
42 | extern inline void sema_init(struct semaphore *sem, int val) | 40 | static inline void sema_init(struct semaphore *sem, int val) |
43 | { | 41 | { |
44 | *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); | 42 | *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); |
45 | } | 43 | } |
46 | 44 | ||
47 | extern inline void init_MUTEX (struct semaphore *sem) | 45 | static inline void init_MUTEX (struct semaphore *sem) |
48 | { | 46 | { |
49 | sema_init(sem, 1); | 47 | sema_init(sem, 1); |
50 | } | 48 | } |
51 | 49 | ||
52 | extern inline void init_MUTEX_LOCKED (struct semaphore *sem) | 50 | static inline void init_MUTEX_LOCKED (struct semaphore *sem) |
53 | { | 51 | { |
54 | sema_init(sem, 0); | 52 | sema_init(sem, 0); |
55 | } | 53 | } |
@@ -61,7 +59,7 @@ extern void __up(struct semaphore * sem); | |||
61 | 59 | ||
62 | /* notice - we probably can do cli/sti here instead of saving */ | 60 | /* notice - we probably can do cli/sti here instead of saving */ |
63 | 61 | ||
64 | extern inline void down(struct semaphore * sem) | 62 | static inline void down(struct semaphore * sem) |
65 | { | 63 | { |
66 | unsigned long flags; | 64 | unsigned long flags; |
67 | int failed; | 65 | int failed; |
@@ -83,7 +81,7 @@ extern inline void down(struct semaphore * sem) | |||
83 | * returns negative for signalled and zero for semaphore acquired. | 81 | * returns negative for signalled and zero for semaphore acquired. |
84 | */ | 82 | */ |
85 | 83 | ||
86 | extern inline int down_interruptible(struct semaphore * sem) | 84 | static inline int down_interruptible(struct semaphore * sem) |
87 | { | 85 | { |
88 | unsigned long flags; | 86 | unsigned long flags; |
89 | int failed; | 87 | int failed; |
@@ -99,7 +97,7 @@ extern inline int down_interruptible(struct semaphore * sem) | |||
99 | return(failed); | 97 | return(failed); |
100 | } | 98 | } |
101 | 99 | ||
102 | extern inline int down_trylock(struct semaphore * sem) | 100 | static inline int down_trylock(struct semaphore * sem) |
103 | { | 101 | { |
104 | unsigned long flags; | 102 | unsigned long flags; |
105 | int failed; | 103 | int failed; |
@@ -119,7 +117,7 @@ extern inline int down_trylock(struct semaphore * sem) | |||
119 | * The default case (no contention) will result in NO | 117 | * The default case (no contention) will result in NO |
120 | * jumps for both down() and up(). | 118 | * jumps for both down() and up(). |
121 | */ | 119 | */ |
122 | extern inline void up(struct semaphore * sem) | 120 | static inline void up(struct semaphore * sem) |
123 | { | 121 | { |
124 | unsigned long flags; | 122 | unsigned long flags; |
125 | int wakeup; | 123 | int wakeup; |