#ifndef SHR_MEM #define SHR_MEM #define _SVID_SOURCE 1 #define _POSIX_C_SOURCE 200112L #include #include #include #include #include "error.h" #include #include #include #include #define SHM_NAME "/BottlerSHM" #define SEM_EMPTY_NAME "/EmptySEM" #define SEM_OPEN_NAME "/OpenSEM" int createShm(int totalSize); void mapShm(char ** shmPointer, int totalSize, int fd); void writeShm(char * address, char * str, int len); int readShm(char * address, char * str, int len); void terminateShm(const char * name, int fd, char * shmPointer, int totalSize); int openCreatedShm(char ** shmPointer, int totalSize); void closeCreatedShm(char * shmPointer, int totalSize, int fd); #endif