#include <mux_pthr.h>
Pthread Mutex Factory
Definition at line 18 of file mux_pthr.h.
◆ make()
Mutex * Botan::Pthread_Mutex_Factory::make |
( |
| ) |
|
|
virtual |
- Returns
- newly allocated mutex
Implements Botan::Mutex_Factory.
Definition at line 22 of file mux_pthr.cpp.
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 pthread_mutex_destroy(&mutex);
51 pthread_mutex_t mutex;
54 return new Pthread_Mutex();
The documentation for this class was generated from the following files: