gatelib  2.1
g_mthread_MutexNamed.h
1 #pragma once
2 #include "g_mthread_MutexAbstract.h"
3 
4 namespace g
5 {
6 namespace mthread
7 {
8 
9 G_EXC_DEFINE_MSG ( TryingToDestroyABusyMutexException , MultithreadException , "Trying to call destructor of a busy mutex!" );
10 
11 class G_LIB_ITEM MutexNamed : public MutexAbstract
12 {
13 public:
14  //Create a named mutex
15  MutexNamed ( const char* aName , NamedSyncObjectCreationOptions_t aCreationOptions = g_create_always );
16  MutexNamed ( const MutexNamed& );
17  virtual ~MutexNamed();
18 
19  virtual void wait ( );
20  virtual bool wait ( GTimeoutSec_t aTimeOutSec );
21  virtual bool tryWait ( );
22  virtual void release ( );
23 };
24 
25 }//namespace mthread
26 }//namespace g
#define G_EXC_DEFINE_MSG(aexctypename, abaseexctypename, amsg)
Definition: g_exception_macros.h:43
Definition: g.mthread.ThreadSimpleEvent.h:5
Definition: g_mthread_MutexNamed.h:11
Definition: g_mthread_MutexAbstract.h:14