MLIB
Loading...
Searching...
No Matches
mutex.h
Go to the documentation of this file.
1#pragma once
2
8
9#include "syncbase.h"
10
11namespace mlib {
12
13class mutex : public syncbase
14{
15public:
16 mutex (const std::string& name = std::string ());
17 operator bool ();
18 void signal ();
19};
20
22inline void mutex::signal ()
23{
24 ReleaseMutex (handle ());
25}
26
27}; // namespace mlib
void signal()
Signal the mutex.
Definition mutex.h:22
mutex(const std::string &name=std::string())
Constructor.
Definition mutex.cpp:28
HANDLE handle() const
Return OS handle of this object.
Definition syncbase.h:54
syncbase()
Default constructor.
Definition syncbase.cpp:37
virtual const std::string & name() const
Return object's name.
Definition syncbase.h:60
syncbase class definition.