00001 00017 // only include/compile if USE_SHMEMDEV is defined 00018 #ifdef USE_SHMEMDEV 00019 #ifdef linux 00020 00021 00022 #ifndef SHMEMEVENTRELAY_H 00023 #define SHMEMEVENTRELAY_H 00024 00025 #include <ctime> 00026 #include "ipc.simple.sem.H" 00027 #include "ipc.simple.shmem.H" 00028 00029 #include "IS3DCommon.H" 00030 #include "PolledDevice.H" 00031 00032 #include "ClusterCreator.H" 00033 #include "ClusterBarrier.H" 00034 #include "ClusterEventBuffer.H" 00035 00036 namespace IS3D { 00037 00038 00043 class ShMemEventRelay : public PolledDevice 00044 { 00045 public: 00046 00047 ShMemEventRelay(); 00048 static ShMemEventRelay* fromConfigVals(const std::string &devname); 00049 00050 virtual ~ShMemEventRelay(); 00051 00052 void pollForEvents(); 00053 void unpackAndSendEvents(char *buf); 00054 00055 protected: 00056 bool _has_terminated; 00057 00058 ClusterEventBuffer *_eventBuffer; 00059 ClusterBarrier *_barrierBeforeEvents, *_barrierAfterEvents; 00060 }; 00061 00062 } // end namespace 00063 00064 #endif 00065 00066 #endif // only on linux 00067 00068 #endif // USE_SHMEMDEV