Anope IRC Services  Version 2.0
Public Member Functions | Protected Attributes
Mutex Class Reference

#include <threadengine.h>

Inheritance diagram for Mutex:
Inheritance graph
[legend]

Public Member Functions

 Mutex ()
 
 ~Mutex ()
 
void Lock ()
 
void Unlock ()
 
bool TryLock ()
 

Protected Attributes

pthread_mutex_t mutex
 

Detailed Description

Definition at line 67 of file threadengine.h.

Constructor & Destructor Documentation

Mutex::Mutex ( )

Constructor

Definition at line 94 of file threadengine.cpp.

References mutex, and pthread_mutex_init().

Mutex::~Mutex ( )

Destructor

Definition at line 99 of file threadengine.cpp.

References mutex, and pthread_mutex_destroy().

Member Function Documentation

void Mutex::Lock ( )
bool Mutex::TryLock ( )

Attempt to lock the mutex, will return true on success and false on fail Does not block

Returns
true or false

Definition at line 114 of file threadengine.cpp.

References mutex, and pthread_mutex_trylock().

void Mutex::Unlock ( )

Field Documentation

pthread_mutex_t Mutex::mutex
protected

Definition at line 71 of file threadengine.h.

Referenced by Lock(), Mutex(), TryLock(), Unlock(), Condition::Wait(), and ~Mutex().


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