7 #ifndef __shm_SharedMem_h__ 8 #define __shm_SharedMem_h__ 10 #define FE_SMC_COMM_COUNT 8 11 #define FE_SMC_COMMAND_BYTES 1024 32 void initialize(
void);
36 virtual Result disconnect(
void)
override;
37 virtual Result dropConnection(
void);
39 using ConnectedCatalog::removeIdentity;
40 virtual Result removeIdentity(I32 a_index)
override;
42 virtual Result connectAsServer(
String a_address,U16 a_port)
override;
43 virtual Result connectAsClient(
String a_address,U16 a_port)
override;
45 virtual Result catchUp(Identity& a_rIdentity);
51 I32 a_includeCount,
const String* a_pIncludes,
52 I32 a_excludeCount,
const String* a_pExcludes,
53 const U8* a_pRawBytes=NULL,I32 a_byteCount=0)
override;
81 U8 m_pData[FE_SMC_COMMAND_BYTES];
87 Comm m_serverComm[FE_SMC_COMM_COUNT];
88 Comm m_clientComm[FE_SMC_COMM_COUNT];
100 virtual ~Channel(
void)
103 munmap(m_pShare,
sizeof(Share));
108 munmap(m_pShare,
sizeof(Share));
118 std::deque<Comm> m_commBacklog;
128 class FE_DL_EXPORT ReceiverTask:
public Thread::Functor
132 virtual ~ReceiverTask(
void);
136 virtual void operate(
void);
139 String a_address,U16 a_port);
141 String a_address,U16 a_port);
146 I32 writeBacklogs(
void);
147 I32 writeBacklog(Channel& a_rChannel);
149 BWORD receiveUpdate(
const String& a_source,
150 SharedMemCatalog::Channel& a_rChannel,
151 SharedMemCatalog::Comm& a_rComm);
153 void decrementReaderCounts(
void);
154 BWORD decrementReaderCount(SharedMemCatalog::Comm& a_rComm);
155 void dumpSemaphores(SharedMemCatalog::Channel& a_rChannel);
159 std::atomic<bool> m_terminate;
160 std::atomic<I32> m_readerDecrementCount;
162 Channel m_publicChannel;
163 AutoHashMap<String,Channel> m_privateChannelMap;
164 BWORD m_receivePublic;
168 BWORD m_usePublicChannel;
169 Thread* m_pReceiverThread;
170 ReceiverTask m_receiverTask;
kernel
Definition: namespace.dox:3
Per-class participation in the Initialized <> mechanism.
Definition: Initialized.h:117
StateCatalog with connected mirroring.
Definition: ConnectedCatalog.h:70
ConnectedCatalog over ZeroMQ.
Definition: SharedMemCatalog.h:23
Automatically reference-counted string container.
Definition: String.h:128