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