X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=include%2Fasm-frv%2Fsemaphore.h;h=d7aaa1911a1afed07771d7eed8437cb196bcf061;hb=969f2361af4bebe56998c8c697be23bbaf274fb2;hp=907c5c3643cced5eb8e3ecef3b33dd8a6607a213;hpb=5367f2d67c7d0bf1faae90e6e7b4e2ac3c9b5e0f;p=linux-2.6-omap-h63xx.git diff --git a/include/asm-frv/semaphore.h b/include/asm-frv/semaphore.h index 907c5c3643c..d7aaa1911a1 100644 --- a/include/asm-frv/semaphore.h +++ b/include/asm-frv/semaphore.h @@ -20,8 +20,6 @@ #include #include -#define SEMAPHORE_DEBUG 0 - /* * 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