#include <mux_pthr.h>
Pthread Mutex Factory
Definition at line 18 of file mux_pthr.h.
Mutex * Botan::Pthread_Mutex_Factory::make |
( |
| ) |
|
|
virtual |
- Returns
- newly allocated mutex
Implements Botan::Mutex_Factory.
Definition at line 22 of file mux_pthr.cpp.
References mutex.
25 class Pthread_Mutex :
public Mutex
30 if(pthread_mutex_lock(&
mutex) != 0)
31 throw Invalid_State(
"Pthread_Mutex::lock: Error occured");
36 if(pthread_mutex_unlock(&
mutex) != 0)
37 throw Invalid_State(
"Pthread_Mutex::unlock: Error occured");
42 if(pthread_mutex_init(&
mutex, 0) != 0)
43 throw Invalid_State(
"Pthread_Mutex: initialization failed");
48 if(pthread_mutex_destroy(&
mutex) != 0)
49 throw Invalid_State(
"~Pthread_Mutex: mutex is still locked");
52 pthread_mutex_t
mutex;
55 return new Pthread_Mutex();
The documentation for this class was generated from the following files: