OpenDDS
Snapshot(2023/04/28-20:55)
dds
DCPS
transport
framework
PoolSynchStrategy.h
Go to the documentation of this file.
1
/*
2
*
3
*
4
* Distributed under the OpenDDS License.
5
* See: http://www.opendds.org/license.html
6
*/
7
8
#ifndef OPENDDS_DCPS_TRANSPORT_FRAMEWORK_POOLSYNCHSTRATEGY_H
9
#define OPENDDS_DCPS_TRANSPORT_FRAMEWORK_POOLSYNCHSTRATEGY_H
10
11
#include "
ThreadSynchStrategy.h
"
12
13
#include <
dds/DCPS/dcps_export.h
>
14
#include <
dds/DCPS/ConditionVariable.h
>
15
16
#include <
ace/Synch_Traits.h
>
17
#include <
ace/Task.h
>
18
19
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
20
21
namespace
OpenDDS
{
22
namespace
DCPS {
23
24
class
OpenDDS_Dcps_Export
PoolSynchStrategy
:
public
ACE_Task_Base
,
25
public
ThreadSynchStrategy
{
26
public
:
27
28
PoolSynchStrategy
();
29
virtual
~
PoolSynchStrategy
();
30
31
virtual
ThreadSynch
* create_synch_object(
32
ThreadSynchResource
* synch_resource,
33
long
priority,
34
long
scheduler);
35
36
virtual
int
open
(
void
*);
37
virtual
int
svc();
38
virtual
int
close
(u_long);
39
40
void
operator
delete
(
void
* ptr) { ThreadSynchStrategy::operator
delete
(ptr); }
41
private
:
42
43
typedef
ACE_SYNCH_MUTEX
LockType
;
44
typedef
ACE_Guard<LockType>
GuardType
;
45
typedef
ConditionVariable<LockType>
ConditionVariableType
;
46
47
LockType
lock_
;
48
ConditionVariableType
condition_
;
49
};
50
51
}
// namespace DCPS
52
}
// namespace OpenDDS
53
54
OPENDDS_END_VERSIONED_NAMESPACE_DECL
55
56
#if defined (__ACE_INLINE__)
57
#include "
PoolSynchStrategy.inl
"
58
#endif
/* __ACE_INLINE__ */
59
60
#endif
/* OPENDDS_DCPS_POOLSYNCHSTRATEGY_H */
ACE_Task_Base
ACE_SYNCH_MUTEX
#define ACE_SYNCH_MUTEX
OpenDDS::DCPS::ThreadSynchStrategy
Definition:
ThreadSynchStrategy.h:24
dcps_export.h
ACE_Guard
OpenDDS_Dcps_Export
#define OpenDDS_Dcps_Export
Definition:
dcps_export.h:24
OpenDDS::DCPS::PoolSynchStrategy::LockType
ACE_SYNCH_MUTEX LockType
Definition:
PoolSynchStrategy.h:43
close
int close(ACE_HANDLE handle)
OpenDDS::DCPS::PoolSynchStrategy::GuardType
ACE_Guard< LockType > GuardType
Definition:
PoolSynchStrategy.h:44
open
ACE_HANDLE open(const char *filename, int mode, mode_t perms=ACE_DEFAULT_OPEN_PERMS, LPSECURITY_ATTRIBUTES sa=0)
Task.h
Synch_Traits.h
ThreadSynchStrategy.h
OpenDDS::DCPS::ThreadSynchResource
Definition:
ThreadSynchResource.h:19
OpenDDS::DCPS::ConditionVariable< LockType >
OpenDDS::DCPS::PoolSynchStrategy
Definition:
PoolSynchStrategy.h:24
OpenDDS::DCPS::PoolSynchStrategy::ConditionVariableType
ConditionVariable< LockType > ConditionVariableType
Definition:
PoolSynchStrategy.h:45
OPENDDS_END_VERSIONED_NAMESPACE_DECL
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
Definition:
Versioned_Namespace.h:48
OPENDDS_BEGIN_VERSIONED_NAMESPACE_DECL
Definition:
Hash.cpp:17
ConditionVariable.h
OpenDDS::DCPS::PoolSynchStrategy::lock_
LockType lock_
Definition:
PoolSynchStrategy.h:47
OpenDDS::DCPS::PoolSynchStrategy::condition_
ConditionVariableType condition_
Definition:
PoolSynchStrategy.h:48
PoolSynchStrategy.inl
OpenDDS
The Internal API and Implementation of OpenDDS.
Definition:
AddressCache.h:28
OpenDDS::DCPS::ThreadSynch
Definition:
ThreadSynch.h:34
Generated by
1.8.13