aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-v850/semaphore.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-v850/semaphore.h')
-rw-r--r--include/asm-v850/semaphore.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/asm-v850/semaphore.h b/include/asm-v850/semaphore.h
index df6cdecf6c1f..735baaf3a16e 100644
--- a/include/asm-v850/semaphore.h
+++ b/include/asm-v850/semaphore.h
@@ -24,7 +24,7 @@ struct semaphore {
24#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC (name,1) 24#define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC (name,1)
25#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC (name,0) 25#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC (name,0)
26 26
27extern inline void sema_init (struct semaphore *sem, int val) 27static inline void sema_init (struct semaphore *sem, int val)
28{ 28{
29 *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); 29 *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val);
30} 30}
@@ -52,14 +52,14 @@ extern int __down_interruptible (struct semaphore * sem);
52extern int __down_trylock (struct semaphore * sem); 52extern int __down_trylock (struct semaphore * sem);
53extern void __up (struct semaphore * sem); 53extern void __up (struct semaphore * sem);
54 54
55extern inline void down (struct semaphore * sem) 55static inline void down (struct semaphore * sem)
56{ 56{
57 might_sleep(); 57 might_sleep();
58 if (atomic_dec_return (&sem->count) < 0) 58 if (atomic_dec_return (&sem->count) < 0)
59 __down (sem); 59 __down (sem);
60} 60}
61 61
62extern inline int down_interruptible (struct semaphore * sem) 62static inline int down_interruptible (struct semaphore * sem)
63{ 63{
64 int ret = 0; 64 int ret = 0;
65 might_sleep(); 65 might_sleep();
@@ -68,7 +68,7 @@ extern inline int down_interruptible (struct semaphore * sem)
68 return ret; 68 return ret;
69} 69}
70 70
71extern inline int down_trylock (struct semaphore *sem) 71static inline int down_trylock (struct semaphore *sem)
72{ 72{
73 int ret = 0; 73 int ret = 0;
74 if (atomic_dec_return (&sem->count) < 0) 74 if (atomic_dec_return (&sem->count) < 0)
@@ -76,7 +76,7 @@ extern inline int down_trylock (struct semaphore *sem)
76 return ret; 76 return ret;
77} 77}
78 78
79extern inline void up (struct semaphore * sem) 79static inline void up (struct semaphore * sem)
80{ 80{
81 if (atomic_inc_return (&sem->count) <= 0) 81 if (atomic_inc_return (&sem->count) <= 0)
82 __up (sem); 82 __up (sem);