public final class ThinLockConstants extends Object
A portion of a word, either in the object header or in some other location, is used to provide light weight synchronization operations. This class defines how the bits available for thin locks are allocated. Either a lock is in fat state, in which case it looks like 1Z..Z where Z..Z is the id of a heavy lock, or it is in thin state in which case it looks like 0I..IC..C where I is the thread id of the thread that owns the lock and C is the recursion count of the lock.
aaaaTTTTTTTTTTbbbbb JavaHeader.NUM_THIN_LOCK_BITS = # of T's JavaHeader.THIN_LOCK_SHIFT = # of b's
Modifier and Type | Field and Description |
---|---|
static int |
TL_DEDICATED_U16_OFFSET |
static int |
TL_DEDICATED_U16_SHIFT |
static Word |
TL_LOCK_COUNT_MASK |
static int |
TL_LOCK_COUNT_SHIFT |
static Word |
TL_LOCK_COUNT_UNIT |
static Word |
TL_LOCK_ID_MASK |
static int |
TL_LOCK_ID_SHIFT |
static int |
TL_NUM_BITS_RC |
static int |
TL_NUM_BITS_STAT |
static int |
TL_NUM_BITS_TID |
static Word |
TL_STAT_BIASABLE |
static Word |
TL_STAT_FAT |
static Word |
TL_STAT_MASK |
static int |
TL_STAT_SHIFT |
static Word |
TL_STAT_THIN |
static Word |
TL_THREAD_ID_MASK |
static int |
TL_THREAD_ID_SHIFT |
static Word |
TL_UNLOCK_MASK |
Modifier | Constructor and Description |
---|---|
private |
ThinLockConstants() |
public static final int TL_NUM_BITS_STAT
public static final int TL_NUM_BITS_TID
public static final int TL_NUM_BITS_RC
public static final int TL_THREAD_ID_SHIFT
public static final int TL_LOCK_COUNT_SHIFT
public static final int TL_STAT_SHIFT
public static final int TL_LOCK_ID_SHIFT
public static final int TL_DEDICATED_U16_OFFSET
public static final int TL_DEDICATED_U16_SHIFT
public static final Word TL_LOCK_COUNT_UNIT
public static final Word TL_LOCK_COUNT_MASK
public static final Word TL_THREAD_ID_MASK
public static final Word TL_LOCK_ID_MASK
public static final Word TL_STAT_MASK
public static final Word TL_UNLOCK_MASK
public static final Word TL_STAT_BIASABLE
public static final Word TL_STAT_THIN
public static final Word TL_STAT_FAT
private ThinLockConstants()