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

#include <threadengine.h>

Inheritance diagram for Mutex:
Inheritance graph

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 ( )


Definition at line 94 of file threadengine.cpp.

References mutex, and pthread_mutex_init().

Mutex::~Mutex ( )


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

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

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: