|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.scheduler.Synchronization
public class Synchronization
Class to provide synchronization methods where java language synchronization is insufficient and Magic.prepare and Magic.attempt are at too low a level.
Constructor Summary | |
---|---|
Synchronization()
|
Method Summary | |
---|---|
static int |
fetchAndAdd(Object base,
Offset offset,
int increment)
|
static Address |
fetchAndAddAddressWithBound(Object base,
Offset offset,
int increment,
Address bound)
|
static int |
fetchAndDecrement(Object base,
Offset offset,
int decrement)
|
static int |
fetchAndStore(Object base,
Offset offset,
int newValue)
|
static Address |
fetchAndStoreAddress(Object base,
Offset offset,
Address newValue)
|
static Address |
fetchAndSubAddressWithBound(Object base,
Offset offset,
int decrement,
Address bound)
|
static boolean |
testAndSet(Object base,
Offset offset,
int newValue)
|
static boolean |
tryCompareAndSwap(Object base,
Offset offset,
Address testValue,
Address newValue)
Atomically swap test value to new value in the specified object and the specified field |
static boolean |
tryCompareAndSwap(Object base,
Offset offset,
int testValue,
int newValue)
Atomically swap test value to new value in the specified object and the specified field |
static boolean |
tryCompareAndSwap(Object base,
Offset offset,
long testValue,
long newValue)
Atomically swap test value to new value in the specified object and the specified field |
static boolean |
tryCompareAndSwap(Object base,
Offset offset,
Object testValue,
Object newValue)
Atomically swap test value to new value in the specified object and the specified field |
static boolean |
tryCompareAndSwap(Object base,
Offset offset,
Word testValue,
Word newValue)
Atomically swap test value to new value in the specified object and the specified field |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Synchronization()
Method Detail |
---|
public static boolean tryCompareAndSwap(Object base, Offset offset, int testValue, int newValue)
base
- object containing fieldoffset
- position of fieldtestValue
- expected value of fieldnewValue
- new value of field
true
=> successful swap, false
=> field not equal to testValuepublic static boolean tryCompareAndSwap(Object base, Offset offset, long testValue, long newValue)
base
- object containing fieldoffset
- position of fieldtestValue
- expected value of fieldnewValue
- new value of field
true
=> successful swap, false
=> field not equal to testValuepublic static boolean tryCompareAndSwap(Object base, Offset offset, Word testValue, Word newValue)
base
- object containing fieldoffset
- position of fieldtestValue
- expected value of fieldnewValue
- new value of field
true
=> successful swap, false
=> field not equal to testValuepublic static boolean tryCompareAndSwap(Object base, Offset offset, Address testValue, Address newValue)
base
- object containing fieldoffset
- position of fieldtestValue
- expected value of fieldnewValue
- new value of field
true
=> successful swap, false
=> field not equal to testValuepublic static boolean tryCompareAndSwap(Object base, Offset offset, Object testValue, Object newValue)
base
- object containing fieldoffset
- position of fieldtestValue
- expected value of fieldnewValue
- new value of field
true
=> successful swap, false
=> field not equal to testValuepublic static boolean testAndSet(Object base, Offset offset, int newValue)
public static int fetchAndStore(Object base, Offset offset, int newValue)
public static Address fetchAndStoreAddress(Object base, Offset offset, Address newValue)
public static int fetchAndAdd(Object base, Offset offset, int increment)
public static int fetchAndDecrement(Object base, Offset offset, int decrement)
public static Address fetchAndAddAddressWithBound(Object base, Offset offset, int increment, Address bound)
public static Address fetchAndSubAddressWithBound(Object base, Offset offset, int decrement, Address bound)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |