X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-cris%2Fsemaphore.h;h=31a4ac448195e640931b58eb4cc8089079b9605f;hb=005011211f559113686938c2c252b8ee1ab855b5;hp=39faf69bcf766523a7ad34e019b9ce63e40de2c5;hpb=fc8e3d177fa8073895d37b50282489dbeec89eb1;p=linux-2.6 diff --git a/include/asm-cris/semaphore.h b/include/asm-cris/semaphore.h index 39faf69bcf..31a4ac4481 100644 --- a/include/asm-cris/semaphore.h +++ b/include/asm-cris/semaphore.h @@ -18,8 +18,6 @@ * CRIS semaphores, implemented in C-only so far. */ -int printk(const char *fmt, ...); - struct semaphore { atomic_t count; atomic_t waking; @@ -37,19 +35,18 @@ struct semaphore { struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) -#define DECLARE_MUTEX_LOCKED(name) __DECLARE_SEMAPHORE_GENERIC(name,0) -extern inline void sema_init(struct semaphore *sem, int val) +static inline void sema_init(struct semaphore *sem, int val) { *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); } -extern inline void init_MUTEX (struct semaphore *sem) +static inline void init_MUTEX (struct semaphore *sem) { sema_init(sem, 1); } -extern inline void init_MUTEX_LOCKED (struct semaphore *sem) +static inline void init_MUTEX_LOCKED (struct semaphore *sem) { sema_init(sem, 0); } @@ -61,7 +58,7 @@ extern void __up(struct semaphore * sem); /* notice - we probably can do cli/sti here instead of saving */ -extern inline void down(struct semaphore * sem) +static inline void down(struct semaphore * sem) { unsigned long flags; int failed; @@ -83,7 +80,7 @@ extern inline void down(struct semaphore * sem) * returns negative for signalled and zero for semaphore acquired. */ -extern inline int down_interruptible(struct semaphore * sem) +static inline int down_interruptible(struct semaphore * sem) { unsigned long flags; int failed; @@ -99,7 +96,7 @@ extern inline int down_interruptible(struct semaphore * sem) return(failed); } -extern inline int down_trylock(struct semaphore * sem) +static inline int down_trylock(struct semaphore * sem) { unsigned long flags; int failed; @@ -119,7 +116,7 @@ extern inline int down_trylock(struct semaphore * sem) * The default case (no contention) will result in NO * jumps for both down() and up(). */ -extern inline void up(struct semaphore * sem) +static inline void up(struct semaphore * sem) { unsigned long flags; int wakeup;