Mutex.h
author StephaneLenclud
Mon, 28 Apr 2014 20:02:08 +0200
changeset 5 d16669f69f0d
permissions -rw-r--r--
IdwTest:Adding support for sending text to VFD.
     1 //------------------------------------------------------------------------------
     2 #ifndef MUTEX_H_INCLUDED
     3 #define MUTEX_H_INCLUDED
     4 //------------------------------------------------------------------------------
     5 #include <windows.h>
     6 //------------------------------------------------------------------------------
     7 class Mutex
     8 {
     9 public:
    10   Mutex();
    11   virtual ~Mutex();
    12 
    13 private:
    14   Mutex(const Mutex& other) {}
    15   Mutex& operator=(const Mutex& other) { return *this; }
    16 
    17 public:
    18   void Request() const;
    19   void Release() const;
    20 
    21 private:
    22   HANDLE m_hMutex;
    23 };
    24 //------------------------------------------------------------------------------
    25 #endif
    26 //------------------------------------------------------------------------------