|
Zero
0.1.0
|
Macros | |
| #define | SM_SOURCE |
Functions | |
| bool | does_already_own (lil_lock_modes_t mode, const bool *lock_taken) |
| bool | has_any_lock (const bool *lock_taken, bool read_lock_only=false) |
| void | clear_lock_flags (bool *lock_taken, bool read_lock_only) |
Variables | |
| const int | INTENT_LOCK_TIMEOUT_MICROSEC = 10000 |
| const int | ABSOLUTE_LOCK_TIMEOUT_MICROSEC = 100000 |
| const clockid_t | CLOCK_FOR_LIL = CLOCK_REALTIME |
| #define SM_SOURCE |
|
inline |
| bool does_already_own | ( | lil_lock_modes_t | mode, |
| const bool * | lock_taken | ||
| ) |
do we already have a desired lock?
|
inline |
do we already have some lock? if we already have some intent lock and trying to upgrade it, encountering a blocking means that there is a chance of deadlock. thus, we should immediately give up although this might be too conservative. anways, it's a rare case.
| const int ABSOLUTE_LOCK_TIMEOUT_MICROSEC = 100000 |
For absolute lock requests. Longer than intent locks to avoid starvation of absolute lock requests.
| const clockid_t CLOCK_FOR_LIL = CLOCK_REALTIME |
| const int INTENT_LOCK_TIMEOUT_MICROSEC = 10000 |
maximum time to wait after failed lock acquisition for intent locks. if timeout happens, the xct is rolled back to prevent deadlocks.
1.8.12