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

#include <mux_win32.h>

Inheritance diagram for Botan::Win32_Mutex_Factory:
Botan::Mutex_Factory

Public Member Functions

Mutexmake ()
 

Detailed Description

Win32 Mutex Factory

Definition at line 19 of file mux_win32.h.

Member Function Documentation

Mutex * Botan::Win32_Mutex_Factory::make ( )
virtual
Returns
newly allocated mutex

Implements Botan::Mutex_Factory.

Definition at line 17 of file mux_win32.cpp.

References mutex.

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  }
Mutex * mutex
Definition: global_rng.cpp:164

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