occ_rwlock Struct Reference

List of all members.

Detailed Description

A multiple-reader/single-writer lock based on pthreads (blocking).

Use this to protect data structures that get hammered by reads and where updates are very rare. It is used in the storage manager by the histograms (histo.cpp), and in place of some mutexen, where strict exclusion isn't required.

This lock is used in the storage manager by the checkpoint thread (the only acquire-writer) and other threads to be sure they don't do certain nasty things when a checkpoint is going on.

The idiom for using these locks is that the qnode is on a threads's stack, so the qnode implicitly identifies the owning thread.

See also: REFSYNC

Definition at line 595 of file sthread.h.

Public Member Functions

 occ_rwlock ()
 ~occ_rwlock ()
void acquire_read ()
 The normal way to acquire a read lock.
void release_read ()
 The normal way to release a read lock.
void acquire_write ()
 The normal way to acquire a write lock.
void release_write ()
 The normal way to release a write lock.


The documentation for this struct was generated from the following files:
Generated on Mon Jan 2 15:14:08 2012 for Shore Storage Manager by  doxygen 1.4.7