|
Zero
0.1.0
|
A lock request entry in a lock queue. More...
#include <lock_bucket.h>
Public Member Functions | |
| uint32_t | get_observed_release_version () const |
| const okvl_mode & | get_requested_mode () const |
| const okvl_mode & | get_granted_mode () const |
Private Member Functions | |
| lock_queue_entry_t (xct_t &xct, smthread_t &thr, xct_lock_info_t &li, const okvl_mode &granted_mode, const okvl_mode &requested_mode) | |
Private Attributes | |
| xct_t & | _xct |
| owning xct. More... | |
| smthread_t & | _thr |
| owning thread. More... | |
| xct_lock_info_t & | _li |
| xct_lock_entry_t * | _xct_entry |
| lock_queue_entry_t * | _prev |
| lock_queue_entry_t * | _next |
| uint64_t | _observed_release_version |
| okvl_mode | _granted_mode |
| okvl_mode | _requested_mode |
Friends | |
| class | lock_queue_t |
| class | lock_core_m |
| ostream & | operator<< (ostream &o, const lock_queue_entry_t &r) |
A lock request entry in a lock queue.
All fields except _prev and _next, which are protected by L in the usual way, of this class have unusual access protections:
For any thread but this->_thr:
read a field: must have read access to L write a field: forbidden
For the thread this->_thr:
read a field: always legal write a field: must have write access to L
where L is the _requests_latch latch of the lock_queue_t we belong to if any. It is believed that this provides complete protection (e.g., no stale reads).
The primary reason for these relaxed rules is to allow release_duration to avoid needing to find and take L in read mode just to see if a lock needs to be released.
|
inlineprivate |
|
inline |
|
inline |
|
inline |
|
friend |
|
friend |
|
friend |
Requires holding a read latch for queue._requests_latch where queue is the lock_queue_t that r belongs to.
|
private |
|
private |
|
private |
|
private |
The _release_version of the lock queue when this lock's _wait_map is last updated. When we check deadlocks, we tentatively ignore other lock requests whose observed_release_version is older than _release_version of the lock queue to prevent false detections. 0 if this lock is not waiting. This is NOT protected by latch because this is used only opportunistically.
|
private |
|
private |
|
private |
owning thread.
|
private |
owning xct.
|
private |
1.8.12