This is Unofficial EPICS BASE Doxygen Site
referenceCountingLock.h
Go to the documentation of this file.
1 
7 #ifndef REFERENCECOUNTINGLOCK_H
8 #define REFERENCECOUNTINGLOCK_H
9 
10 #ifdef epicsExportSharedSymbols
11 # define referenceCountingLockEpicsExportSharedSymbols
12 # undef epicsExportSharedSymbols
13 #endif
14 
15 #include <pv/lock.h>
16 #include <pv/pvType.h>
17 #include <pv/sharedPtr.h>
18 
19 #ifdef referenceCountingLockEpicsExportSharedSymbols
20 # define epicsExportSharedSymbols
21 # undef referenceCountingLockEpicsExportSharedSymbols
22 #endif
23 
24 namespace epics {
25 namespace pvAccess {
26 
36 {
37 public:
39 
48  virtual ~ReferenceCountingLock();
62  bool acquire(epics::pvData::int64 msecs);
66  void release();
72  int increment();
78  int decrement();
79 private:
80  int _references;
81  epics::pvData::Mutex _mutex;
82  epics::pvData::Mutex _countMutex;
83 };
84 
85 }
86 }
87 
88 #endif /* REFERENCECOUNTINGLOCK_H */
TODO only here because of the Lockable.
Definition: ntaggregate.cpp:16
POINTER_DEFINITIONS(ReferenceCountingLock)
int64_t int64
Definition: pvType.h:87
epicsMutex Mutex
Definition: lock.h:28
bool acquire(epics::pvData::int64 msecs)