X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=include%2Fasm-frv%2Fsemaphore.h;h=d7aaa1911a1afed07771d7eed8437cb196bcf061;hb=93890b71a34f9490673a6edd56b61c2124215e46;hp=b18396288df1a0475fe7d28d09189076e2fcf7e4;hpb=ba77df570c6710c9c19b31e0e48e4bcdf31cefe8;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-frv/semaphore.h b/include/asm-frv/semaphore.h index b18396288df..d7aaa1911a1 100644 --- a/include/asm-frv/semaphore.h +++ b/include/asm-frv/semaphore.h @@ -20,8 +20,6 @@ #include #include -#define SEMAPHORE_DEBUG WAITQUEUE_DEBUG - /* * the semaphore definition * - if counter is >0 then there are tokens available on the semaphore for down to collect @@ -32,12 +30,12 @@ struct semaphore { unsigned counter; spinlock_t wait_lock; struct list_head wait_list; -#if SEMAPHORE_DEBUG +#ifdef CONFIG_DEBUG_SEMAPHORE unsigned __magic; #endif }; -#if SEMAPHORE_DEBUG +#ifdef CONFIG_DEBUG_SEMAPHORE # define __SEM_DEBUG_INIT(name) , (long)&(name).__magic #else # define __SEM_DEBUG_INIT(name) @@ -51,7 +49,6 @@ 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) static inline void sema_init (struct semaphore *sem, int val) { @@ -76,7 +73,7 @@ static inline void down(struct semaphore *sem) { unsigned long flags; -#if SEMAPHORE_DEBUG +#ifdef CONFIG_DEBUG_SEMAPHORE CHECK_MAGIC(sem->__magic); #endif @@ -95,7 +92,7 @@ static inline int down_interruptible(struct semaphore *sem) unsigned long flags; int ret = 0; -#if SEMAPHORE_DEBUG +#ifdef CONFIG_DEBUG_SEMAPHORE CHECK_MAGIC(sem->__magic); #endif @@ -119,7 +116,7 @@ static inline int down_trylock(struct semaphore *sem) unsigned long flags; int success = 0; -#if SEMAPHORE_DEBUG +#ifdef CONFIG_DEBUG_SEMAPHORE CHECK_MAGIC(sem->__magic); #endif @@ -136,7 +133,7 @@ static inline void up(struct semaphore *sem) { unsigned long flags; -#if SEMAPHORE_DEBUG +#ifdef CONFIG_DEBUG_SEMAPHORE CHECK_MAGIC(sem->__magic); #endif