#include <sys/stat.h>\r
#include <sys/mman.h>\r
#include <sys/types.h>\r
-#include "../../src/sharedmemory.h"\r
-#include "../../src/sharedmemory_global.h"\r
+#include "../../src/sharedmemory_struct.h"\r
\r
enum{ NOP_SHM, WAIT_ATTACH_SHM, TRY_ATTACH_SHM, MAT_SHM, CLEAN_UP_SHM, RUN_SHM };\r
\r
+int shm_fd;\r
+shm_t *shmptr = NULL;\r
+char shm_file_name[128];\r
+\r
int wait = 0, opt;\r
uint8_t last, shm_statem = TRY_ATTACH_SHM;\r
\r
{\r
exit(EXIT_FAILURE); //You dont have to exit you could just report the fact that the data is not valid \r
}\r
-}
\ No newline at end of file
+}\r
#include "sharedmemory.h"\r
-#include "sharedmemory_global.h"\r
+\r
+int shm_fd;\r
+shm_t *shmptr = NULL;\r
+char shm_file_name[128];\r
\r
void Sharedmemory_init( int bindport, int bindport6 ) \r
{\r
close( shm_fd );\r
shm_unlink( shm_file_name );\r
shmptr->umurmurd_pid = 0;\r
-}
\ No newline at end of file
+}\r