#include <mux_win32.h>
Win32 Mutex Factory
Definition at line 19 of file mux_win32.h.
◆ make()
| Mutex * Botan::Win32_Mutex_Factory::make |
( |
| ) |
|
|
virtual |
- Returns
- newly allocated mutex
Implements Botan::Mutex_Factory.
Definition at line 17 of file mux_win32.cpp.
18 {
19 class Win32_Mutex : public Mutex
20 {
21 public:
22 void lock() { EnterCriticalSection(&mutex); }
23 void unlock() { LeaveCriticalSection(&mutex); }
24
25 Win32_Mutex() { InitializeCriticalSection(&mutex); }
26 ~Win32_Mutex() { DeleteCriticalSection(&mutex); }
27 private:
28 CRITICAL_SECTION mutex;
29 };
30
31 return new Win32_Mutex();
32 }
The documentation for this class was generated from the following files: