diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-19 22:16:58 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-19 22:16:58 -0800 |
commit | 497992917edf03994088ec8757b8262e1d9f568a (patch) | |
tree | 7e82975f98d3d3c9f80e10c981601db23eef5bd1 /include/asm-ia64/semaphore.h | |
parent | 7e732bfc5570b8f9bb5f155cf36e94b2e7d6bf6a (diff) | |
parent | 386d1d50c8eef254653b1015fde06622ef38ba76 (diff) | |
download | kernel_goldelico_gta04-497992917edf03994088ec8757b8262e1d9f568a.zip kernel_goldelico_gta04-497992917edf03994088ec8757b8262e1d9f568a.tar.gz kernel_goldelico_gta04-497992917edf03994088ec8757b8262e1d9f568a.tar.bz2 |
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
Diffstat (limited to 'include/asm-ia64/semaphore.h')
-rw-r--r-- | include/asm-ia64/semaphore.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/asm-ia64/semaphore.h b/include/asm-ia64/semaphore.h index bb89062..f483eeb 100644 --- a/include/asm-ia64/semaphore.h +++ b/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); } |