Main Page
Class Hierarchy
Alphabetical List
Compound List
File List
Compound Members
include
FXSemaphore.h
1
/********************************************************************************
2
* *
3
* S e m a p h o r e C l a s s *
4
* *
5
*********************************************************************************
6
* Copyright (C) 2004,2024 by Jeroen van der Zijp. All Rights Reserved. *
7
*********************************************************************************
8
* This library is free software; you can redistribute it and/or modify *
9
* it under the terms of the GNU Lesser General Public License as published by *
10
* the Free Software Foundation; either version 3 of the License, or *
11
* (at your option) any later version. *
12
* *
13
* This library is distributed in the hope that it will be useful, *
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16
* GNU Lesser General Public License for more details. *
17
* *
18
* You should have received a copy of the GNU Lesser General Public License *
19
* along with this program. If not, see <http://www.gnu.org/licenses/> *
20
********************************************************************************/
21
#ifndef FXSEMAPHORE_H
22
#define FXSEMAPHORE_H
23
24
namespace
FX
{
25
26
38
class
FXAPI
FXSemaphore
{
39
private
:
40
FXuval data[21];
41
private
:
42
FXSemaphore
(
const
FXSemaphore
&);
43
FXSemaphore
& operator=(
const
FXSemaphore
&);
44
public
:
45
47
FXSemaphore
(FXint count=1);
48
50
void
wait();
51
53
FXbool wait(FXTime nsec);
54
56
FXbool trywait();
57
59
void
post();
60
62
~
FXSemaphore
();
63
};
64
65
}
66
67
#endif
68
FX::FXSemaphore
A semaphore allows for protection of a resource that can be accessed by a fixed number of simultaneou...
Definition:
FXSemaphore.h:38
FX
Definition:
FX4Splitter.h:28
Copyright © 1997-2022 Jeroen van der Zijp