Zero  0.1.0
Public Member Functions | Public Attributes | Private Attributes | Friends | List of all members
xct_lock_info_t Class Reference

Locking-related status of one transaction. More...

#include <lock_x.h>

Inheritance diagram for xct_lock_info_t:

Public Member Functions

 xct_lock_info_t ()
 
 ~xct_lock_info_t ()
 
xct_lock_info_treset_for_reuse ()
 
ostream & dump_locks (ostream &out) const
 unsafe output operator, for debugging More...
 
tid_t tid () const
 ID of the transaction that owns this structure. More...
 
void set_tid (const tid_t &t)
 See above. More...
 
xct_lock_entry_tlink_to_new_request (lock_queue_t *queue, lock_queue_entry_t *entry)
 Each thread has a wait_map. More...
 
void remove_request (xct_lock_entry_t *entry)
 
XctLockHashMapget_private_hashmap ()
 

Public Attributes

xct_lock_entry_t_head
 
xct_lock_entry_t_tail
 
XctLockHashMap _hashmap
 
srwlock_t _shared_latch
 
bool _permission_to_violate
 
lsn_t _commit_lsn
 

Private Attributes

tid_t _tid
 
atomic_thread_map_t _wait_map
 

Friends

ostream & operator<< (ostream &o, const xct_lock_info_t &x)
 unsafe output operator, for debugging More...
 

Detailed Description

Locking-related status of one transaction.

Shared between transaction (xct_t) and lock manager. Note that this object is one-per-transaction, not one-per-lock. The per-lock object is xct_lock_entry_t (xct side) and lock_queue_entry_t (queue side).

Constructor & Destructor Documentation

§ xct_lock_info_t()

xct_lock_info_t::xct_lock_info_t ( )

§ ~xct_lock_info_t()

xct_lock_info_t::~xct_lock_info_t ( )

Member Function Documentation

§ dump_locks()

ostream& xct_lock_info_t::dump_locks ( ostream &  out) const

unsafe output operator, for debugging

§ get_private_hashmap()

XctLockHashMap& xct_lock_info_t::get_private_hashmap ( )
inline

Returns the private hashmap to check already-granted locks.

§ link_to_new_request()

xct_lock_entry_t * xct_lock_info_t::link_to_new_request ( lock_queue_t queue,
lock_queue_entry_t entry 
)

Each thread has a wait_map.

§ remove_request()

void xct_lock_info_t::remove_request ( xct_lock_entry_t entry)

§ reset_for_reuse()

xct_lock_info_t * xct_lock_info_t::reset_for_reuse ( )

Prepare this structure for use by a new transaction. Used by the TLS agent when recycling a structure after the xct that used it goes away.

§ set_tid()

void xct_lock_info_t::set_tid ( const tid_t t)
inline

See above.

§ tid()

tid_t xct_lock_info_t::tid ( ) const
inline

ID of the transaction that owns this structure.

Friends And Related Function Documentation

§ operator<<

ostream& operator<< ( ostream &  o,
const xct_lock_info_t x 
)
friend

unsafe output operator, for debugging

Member Data Documentation

§ _commit_lsn

lsn_t xct_lock_info_t::_commit_lsn

§ _hashmap

XctLockHashMap xct_lock_info_t::_hashmap

Auxiliary hashmap of the locks acquired by this transaction.

§ _head

xct_lock_entry_t* xct_lock_info_t::_head

§ _permission_to_violate

bool xct_lock_info_t::_permission_to_violate

§ _shared_latch

srwlock_t xct_lock_info_t::_shared_latch

§ _tail

xct_lock_entry_t* xct_lock_info_t::_tail

§ _tid

tid_t xct_lock_info_t::_tid
private

§ _wait_map

atomic_thread_map_t xct_lock_info_t::_wait_map
private

The documentation for this class was generated from the following files: