Lockword.
More...
Lockword.
Definition at line 37 of file lockword.hpp.
Lockword::Lockword |
( |
uintptr_t & |
lockword | ) |
|
|
inline |
void Lockword::decrease_thin_lock_count |
( |
| ) |
|
|
inline |
uintptr_t Lockword::get_thin_lock |
( |
| ) |
const |
|
inline |
int32_t Lockword::get_thin_lock_count |
( |
| ) |
const |
|
inline |
int32_t Lockword::get_thin_lock_thread_index |
( |
| ) |
const |
|
inline |
uintptr_t Lockword::get_thin_lock_without_count |
( |
| ) |
const |
|
inline |
void Lockword::increase_thin_lock_count |
( |
| ) |
|
|
inline |
Inflate the lock of the given object.
This may only be called by the owner of the monitor of the object.
PRE-CONDITION: The current thread must be the owner of this object's monitor AND of the lock record's lock!
- Parameters
-
lr | The lock-record to install. The current thread must own the lock of this lock record! |
Definition at line 44 of file lockword.cpp.
bool Lockword::is_fat_lock |
( |
| ) |
const |
|
inline |
bool Lockword::is_max_thin_lock_count |
( |
| ) |
const |
|
inline |
bool Lockword::is_thin_lock |
( |
| ) |
const |
|
inline |
bool Lockword::is_unlocked |
( |
| ) |
const |
|
inline |
Check if the lockword is an unlocked thin-lock.
- Returns
- true if unlocked, false otherwise.
Definition at line 119 of file lockword.hpp.
bool Lockword::lock |
( |
uintptr_t |
thinlock | ) |
|
|
inline |
Try to lock the lockword with the given thin-lock value.
- Parameters
-
thinlock | Thin-lock value to store in the Lockword. |
- Returns
- true if lock was successful, false otherwise.
Definition at line 132 of file lockword.hpp.
uintptr_t Lockword::pre_compute_thinlock |
( |
int32_t |
index | ) |
|
|
inlinestatic |
Pre-compute the thin lock value for a thread index.
- Parameters
-
index | The thead index (>= 1). |
- Returns
- The thin lock value for this thread index.
Definition at line 96 of file lockword.hpp.
void Lockword::set |
( |
uintptr_t |
lockword | ) |
|
|
inline |
void Lockword::unlock |
( |
| ) |
|
|
inline |
Set the lockword to THIN_UNLOCKED.
Definition at line 144 of file lockword.hpp.
uintptr_t& Lockword::_lockword |
|
private |
const int Lockword::THIN_LOCK_COUNT_SHIFT = 1 |
|
staticprivate |
const int Lockword::THIN_LOCK_COUNT_SIZE = 8 |
|
staticprivate |
const int Lockword::THIN_LOCK_SHAPE_BIT = 0x01 |
|
staticprivate |
const int Lockword::THIN_LOCK_WORD_SIZE = SIZEOF_VOID_P * 8 |
|
staticprivate |
const uintptr_t Lockword::THIN_UNLOCKED = 0 |
|
staticprivate |
The documentation for this class was generated from the following files:
- /home/bbc/buildbot/slave/doxygen-compiler2/source/cacao/src/threads/lockword.hpp
- /home/bbc/buildbot/slave/doxygen-compiler2/source/cacao/src/threads/lockword.cpp