patch-2.3.99-pre6 linux/include/asm-ia64/semaphore.h

Next file: linux/include/asm-ia64/siginfo.h
Previous file: linux/include/asm-ia64/sal.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre5/linux/include/asm-ia64/semaphore.h linux/include/asm-ia64/semaphore.h
@@ -230,7 +230,7 @@
 	do {
 		old_count = sem->count;
 		new_count = old_count - RW_LOCK_BIAS;
-	} while (cmpxchg(&sem->count, old_count, new_count) != old_count);
+	} while (cmpxchg_acq(&sem->count, old_count, new_count) != old_count);
 
 	if (new_count != 0)
 		__down_write_failed(sem, new_count);
@@ -279,7 +279,7 @@
 	do {
 		old_count = sem->count;
 		new_count = old_count + RW_LOCK_BIAS;
-	} while (cmpxchg(&sem->count, old_count, new_count) != old_count);
+	} while (cmpxchg_rel(&sem->count, old_count, new_count) != old_count);
 
 	/*
 	 * Note: new_count <u RW_LOCK_BIAS <=> old_count < 0 && new_count >= 0.

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)