tatas_lock Struct ReferenceList of all members.
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.
- test-and-test-and-set locks: low-overhead but not scalable
- queue-based locks: higher overhead but scalable
- pthread mutexes : very high overhead and blocks, but frees up cpu for other threads when number of cpus is fewer than number of threads
- See also:
Definition at line 305 of file sthread.h.
Public Member Functions
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 Mon Jan 2 15:14:15 2012 for Shore Storage Manager by