From 0436ab7111671b5c0123f435cb7056cb4323f16b Mon Sep 17 00:00:00 2001 From: Zoltan Menyhart Date: Fri, 13 Jan 2006 17:25:23 +0100 Subject: [PATCH] --- yaml --- r: 19016 b: refs/heads/master c: 4b16bfbf8f8013fefb49592d030ff87651ab48cb h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-ia64/semaphore.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 2f36018fb854..640cb4632e8e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8d08aed8d7714683b33666cc066e20f957dda01d +refs/heads/master: 4b16bfbf8f8013fefb49592d030ff87651ab48cb diff --git a/trunk/include/asm-ia64/semaphore.h b/trunk/include/asm-ia64/semaphore.h index bb8906285fab..f483eeb95dd1 100644 --- a/trunk/include/asm-ia64/semaphore.h +++ b/trunk/include/asm-ia64/semaphore.h @@ -61,7 +61,7 @@ static inline void down (struct semaphore *sem) { might_sleep(); - if (atomic_dec_return(&sem->count) < 0) + if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1) __down(sem); } @@ -75,7 +75,7 @@ down_interruptible (struct semaphore * sem) int ret = 0; might_sleep(); - if (atomic_dec_return(&sem->count) < 0) + if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1) ret = __down_interruptible(sem); return ret; } @@ -85,7 +85,7 @@ down_trylock (struct semaphore *sem) { int ret = 0; - if (atomic_dec_return(&sem->count) < 0) + if (ia64_fetchadd(-1, &sem->count.counter, acq) < 1) ret = __down_trylock(sem); return ret; } @@ -93,7 +93,7 @@ down_trylock (struct semaphore *sem) static inline void up (struct semaphore * sem) { - if (atomic_inc_return(&sem->count) <= 0) + if (ia64_fetchadd(1, &sem->count.counter, rel) <= -1) __up(sem); }