EHS Embedded HTTP Server  1.5.1.173
MutexHelper Class Reference

Automatically unlocks a mutex if destroyed. More...

#include <wsendpoint.h>

Public Member Functions

 MutexHelper (pthread_mutex_t *mutex, bool locknow=true)
 Constructs a new instance. More...
 
 ~MutexHelper ()
 Unlocks the associated mutex.
 
void Lock ()
 Locks the associated mutex.
 
void Unlock ()
 Unlocks the associated mutex.
 

Detailed Description

Automatically unlocks a mutex if destroyed.

Definition at line 21 of file wsendpoint.h.

Constructor & Destructor Documentation

◆ MutexHelper()

MutexHelper ( pthread_mutex_t *  mutex,
bool  locknow = true 
)
inline

Constructs a new instance.

The associated mutex is locked by default.

Parameters
mutexThe mutex to use.
locknowfalse, if the mutex should not be locked initially

Definition at line 29 of file wsendpoint.h.

References Lock().

+ Here is the call graph for this function:

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