tatas_lock Struct Reference

List of all members.

Detailed Description

A test-and-test-and-set spinlock.

This lock is good for short, uncontended critical sections. If contention is high, use an mcs_lock. Long critical sections should use pthread_mutex_t.

Tradeoffs are:

See also:
REFSYNC

Definition at line 303 of file sthread.h.

Public Member Functions

 tatas_lock ()
bool try_lock ()
 Try to acquire the lock immediately.
void acquire ()
 Acquire the lock, spinning as long as necessary.
void release ()
 Release the lock.
bool is_mine () const
 True if this thread is the lock holder.


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