$extrastylesheet
libMesh::Threads::recursive_mutex Class Reference

#include <threads.h>

List of all members.

Classes

class  scoped_lock

Public Member Functions

 recursive_mutex ()
 ~recursive_mutex ()
void lock ()
void unlock ()
 recursive_mutex ()

Private Attributes

pthread_mutex_t mutex
pthread_mutexattr_t attr

Detailed Description

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

Definition at line 398 of file threads.h.


Constructor & Destructor Documentation

Definition at line 402 of file threads.h.

References attr, and mutex.

  {
    pthread_mutexattr_init(&attr);
    pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
    pthread_mutex_init(&mutex, &attr);
  }

Definition at line 408 of file threads.h.

References mutex.

{ pthread_mutex_destroy(&mutex); }

Definition at line 885 of file threads.h.

{}

Member Function Documentation

Definition at line 411 of file threads.h.

References mutex.

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

{ pthread_mutex_unlock(&mutex); }

Member Data Documentation

pthread_mutexattr_t libMesh::Threads::recursive_mutex::attr [private]

Definition at line 430 of file threads.h.

Referenced by recursive_mutex().

pthread_mutex_t libMesh::Threads::recursive_mutex::mutex [private]

Definition at line 429 of file threads.h.

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


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