latch_holder_t Class Reference

Collaboration diagram for latch_holder_t:

Collaboration graph
[legend]
List of all members.

Detailed Description

Indicates a latch is held by this thread.

Every time we want to grab a latch, we have to create a latch_holder_t. We do that with the holder_search class, which searches a TLS list to make sure we(this thread) doesn't already hold the latch, and, if not, it creates a new latch_holder_t for the new latch acquisition. It then stuffs the latch_holder_t in the TLS list. If we do already have hold the latch in some capacity, the holder_search returns that existing latch_holder_t.

See also:
holder_search

Definition at line 93 of file latch.h.

Public Member Functions

 latch_holder_t ()
bool operator== (latch_holder_t const &other) const
void print (ostream &o) const

Public Attributes

latch_t_latch
latch_mode_t _mode
int _count
latch_holder_t_prev
latch_holder_t_next

Static Public Attributes

static __thread latch_holder_tthread_local_holders
 Linked list of all latches held by this thread.
static __thread latch_holder_tthread_local_freelist
 Pool of unused latch_holder_t instances.


The documentation for this class was generated from the following files:
Generated on Wed Jul 7 17:22:43 2010 for Shore Storage Manager by  doxygen 1.4.7