/*
* These two _must_ execute atomically wrt each other.
*/
-extern inline void wake_one_more(struct semaphore * sem)
+static inline void wake_one_more(struct semaphore * sem)
{
atomic_inc(&sem->waking);
}
-extern inline int waking_non_zero(struct semaphore *sem)
+static inline int waking_non_zero(struct semaphore *sem)
{
unsigned long flags;
int ret = 0;
return ret;
}
-extern inline int waking_non_zero_interruptible(struct semaphore *sem,
+static inline int waking_non_zero_interruptible(struct semaphore *sem,
struct task_struct *tsk)
{
int ret = 0;
dec(&sem->waking);
ret = 1;
} else if (signal_pending(tsk)) {
- count_inc(&sem->count);
+ inc(&sem->count);
ret = -EINTR;
}
local_irq_restore(flags);
return ret;
}
-extern inline int waking_non_zero_trylock(struct semaphore *sem)
+static inline int waking_non_zero_trylock(struct semaphore *sem)
{
int ret = 1;
unsigned long flags;
local_save_flags(flags);
local_irq_disable();
if (read(&sem->waking) <= 0)
- count_inc(&sem->count);
+ inc(&sem->count);
else {
dec(&sem->waking);
ret = 0;