$extrastylesheet
libMesh::Threads::spin_mutex Class Reference

#include <threads.h>

List of all members.

Classes

class  scoped_lock

Public Member Functions

 spin_mutex ()
 ~spin_mutex ()
void lock ()
void unlock ()
 spin_mutex ()
 ~spin_mutex ()
void lock ()
void unlock ()
 spin_mutex ()
void lock ()
void unlock ()

Private Attributes

OSSpinLock slock
pthread_spinlock_t slock

Detailed Description

Spin mutex. Implements mutual exclusion by busy-waiting in user space for the lock to be acquired.

Definition at line 335 of file threads.h.


Constructor & Destructor Documentation

Definition at line 338 of file threads.h.

: slock(0) {} // The convention is that the lock being zero is _unlocked_

Definition at line 339 of file threads.h.

{}

Definition at line 367 of file threads.h.

References slock.

{ pthread_spin_init(&slock, PTHREAD_PROCESS_PRIVATE); }

Definition at line 368 of file threads.h.

References slock.

{ pthread_spin_destroy(&slock); }

Definition at line 863 of file threads.h.

{}

Member Function Documentation

Definition at line 370 of file threads.h.

References slock.

{ pthread_spin_lock(&slock); }

Definition at line 864 of file threads.h.

{}

Definition at line 342 of file threads.h.

References slock.

Referenced by libMesh::Threads::spin_mutex::scoped_lock::release().

{ OSSpinLockUnlock(&slock); }

Definition at line 371 of file threads.h.

References slock.

{ pthread_spin_unlock(&slock); }

Definition at line 865 of file threads.h.

{}

Member Data Documentation

Definition at line 360 of file threads.h.

Referenced by lock(), spin_mutex(), unlock(), and ~spin_mutex().

pthread_spinlock_t libMesh::Threads::spin_mutex::slock [private]

Definition at line 389 of file threads.h.


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