EHS
BaseSemaphore.h
Go to the documentation of this file.
1#pragma once
2
3#include "ehs/EHS.h"
4#include "ehs/Str.h"
5
6namespace ehs
7{
8 class EHS_LIB_IO BaseSemaphore
9 {
10 private:
11 Str_8 name;
12 UInt_32 initial;
13
14 public:
16
17 BaseSemaphore(Str_8 name, const UInt_32 initial);
18
19 BaseSemaphore(const UInt_32 initial);
20
21 BaseSemaphore(BaseSemaphore&& sem) noexcept;
22
23 BaseSemaphore(const BaseSemaphore& sem);
24
25 BaseSemaphore& operator=(BaseSemaphore&& sem) noexcept;
26
27 BaseSemaphore& operator=(const BaseSemaphore& sem);
28
29 virtual void Initialize() = 0;
30
31 virtual void Release() = 0;
32
33 virtual void Signal(const UInt_32 inc) = 0;
34
35 virtual bool Wait(const UInt_32 timeout) = 0;
36
37 Str_8 GetName() const;
38
39 UInt_32 GetInitial() const;
40
41 virtual bool IsValid() const = 0;
42 };
43}
Definition: BaseSemaphore.h:9
virtual bool IsValid() const =0
virtual void Initialize()=0
virtual bool Wait(const UInt_32 timeout)=0
virtual void Signal(const UInt_32 inc)=0
virtual void Release()=0
Definition: Anchor.h:6
unsigned int UInt_32
Definition: Types.h:49