Botan: Botan::Mutex_Holder Class Reference

Botan 1.10.12

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
Botan::Mutex_Holder Class Reference

`#include <mutex.h>`

## Public Member Functions
| Mutex_Holder (Mutex *m)
| ~Mutex_Holder ()

## Detailed Description

Mutex Holding Class for RAII

Definition at line 50 of file mutex.h.

## Constructor & Destructor Documentation

Botan::Mutex_Holder::Mutex_Holder | ( | Mutex * | m | ) |
| inline

Hold onto a mutex until we leave scope

Parameters

  m | the mutex to lock

Definition at line 57 of file mutex.h.

57 : mux(m)
58 {
59 if(!mux)
60 throw Invalid_Argument("Mutex_Holder: Argument was NULL");
61 mux->lock();
62 }
Botan::Mutex::lock
virtual void lock()=0
Botan::Invalid_Argument
std::invalid_argument Invalid_Argument
Definition: exceptn.h:20
m
endian little unaligned ok family x86< aliases > ia32 x86 ix86 i86pc x86pc bepc</aliases >< submodels > i386 i486 i586 i686 pentium2 pentium3 pentium4 pentium m prescott k6 athlon atom32</submodels >< submodel_aliases > pentium i586 pentiumpro i686 pentium_pro i686 pentium2 pentium2 pentiumii pentium2 pentium3 pentium3 pentiumiii pentium3 x86family5 i586 x86family6 i686 pentiumm pentium m intelpentiumm pentium m intelpentium4 pentium4 duron athlon athlon xp athlon k7 athlon p2 i686 p3 i686 p4 pentium4 intelcput2250 prescott intelcput2300 prescott intelcput2400 prescott intelcput2500 prescott intelcput2600 prescott intelcput2700 prescott</submodel_aliases >< isa_extn > pentium m
Definition: x86_32.txt:65

Botan::Mutex_Holder::~Mutex_Holder | ( |  | ) |
| inline

Definition at line 64 of file mutex.h.

64 { mux->unlock(); }
Botan::Mutex::unlock
virtual void unlock()=0

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

- src/mutex/mutex.h