|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
diff -up jack-1.9.5/linux/JackAtomic_os.h.atomic jack-1.9.5/linux/JackAtomic_os.h
|
|
|
|
|
--- jack-1.9.5/linux/JackAtomic_os.h.atomic 2010-08-28 15:23:58.000000000 +0200
|
|
|
|
|
+++ jack-1.9.5/linux/JackAtomic_os.h 2010-09-01 09:29:03.000000000 +0200
|
|
|
|
|
@@ -22,23 +22,23 @@ Foundation, Inc., 59 Temple Place - Suit
|
|
|
|
|
@@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suit
|
|
|
|
|
|
|
|
|
|
#include "JackTypes.h"
|
|
|
|
|
|
|
|
|
@ -10,30 +10,6 @@ diff -up jack-1.9.5/linux/JackAtomic_os.h.atomic jack-1.9.5/linux/JackAtomic_os.
|
|
|
|
|
|
|
|
|
|
static inline int CAS(register UInt32 value, register UInt32 newvalue, register volatile void* addr)
|
|
|
|
|
{
|
|
|
|
|
register int result;
|
|
|
|
|
register UInt32 tmp;
|
|
|
|
|
asm volatile (
|
|
|
|
|
- "# CAS \n"
|
|
|
|
|
- " lwarx %4, 0, %1 \n" // creates a reservation on addr
|
|
|
|
|
- " cmpw %4, %2 \n" // test value at addr
|
|
|
|
|
- " bne- 1f \n"
|
|
|
|
|
- " sync \n" // synchronize instructions
|
|
|
|
|
- " stwcx. %3, 0, %1 \n" // if the reservation is not altered
|
|
|
|
|
+ "# CAS \n"
|
|
|
|
|
+ " lwarx %4, 0, %1 \n" // creates a reservation on addr
|
|
|
|
|
+ " cmpw %4, %2 \n" // test value at addr
|
|
|
|
|
+ " bne- 1f \n"
|
|
|
|
|
+ " sync \n" // synchronize instructions
|
|
|
|
|
+ " stwcx. %3, 0, %1 \n" // if the reservation is not altered
|
|
|
|
|
// stores the new value at addr
|
|
|
|
|
- " bne- 1f \n"
|
|
|
|
|
+ " bne- 1f \n"
|
|
|
|
|
" li %0, 1 \n"
|
|
|
|
|
- " b 2f \n"
|
|
|
|
|
+ " b 2f \n"
|
|
|
|
|
"1: \n"
|
|
|
|
|
" li %0, 0 \n"
|
|
|
|
|
"2: \n"
|
|
|
|
|
@@ -48,9 +48,7 @@ static inline int CAS(register UInt32 va
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|