OpenDDS  Snapshot(2023/04/28-20:55)
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>
15 
16 #include <ace/Synch_Traits.h>
17 #include <ace/Task.h>
18 
20 
21 namespace OpenDDS {
22 namespace DCPS {
23 
25  public ThreadSynchStrategy {
26 public:
27 
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 
46 
47  LockType lock_;
48  ConditionVariableType condition_;
49 };
50 
51 } // namespace DCPS
52 } // namespace OpenDDS
53 
55 
56 #if defined (__ACE_INLINE__)
57 #include "PoolSynchStrategy.inl"
58 #endif /* __ACE_INLINE__ */
59 
60 #endif /* OPENDDS_DCPS_POOLSYNCHSTRATEGY_H */
#define ACE_SYNCH_MUTEX
#define OpenDDS_Dcps_Export
Definition: dcps_export.h:24
int close(ACE_HANDLE handle)
ACE_HANDLE open(const char *filename, int mode, mode_t perms=ACE_DEFAULT_OPEN_PERMS, LPSECURITY_ATTRIBUTES sa=0)
ConditionVariable< LockType > ConditionVariableType
#define OPENDDS_END_VERSIONED_NAMESPACE_DECL
ConditionVariableType condition_
The Internal API and Implementation of OpenDDS.
Definition: AddressCache.h:28