#ifndef LIBRARY_SHAREDMEMORYACCESSS_H #define LIBRARY_SHAREDMEMORYACCESSS_H namespace vkvm { auto initSemaphore() -> int; /** * use lock and unlock when writing * @return pointer to the shared memory */ auto getSharedMemory() -> char *; /** * use lock and unlock when writing, * set content to the address * @param *address target address * @param size of data * @param offset where the data is written on the shared memory */ auto getSharedMemory(char *address, int size, int offset) -> void; /** * * @return the size of the shared memory */ auto getSharedMemorySize() -> int; auto lockSharedMemory() -> void; auto unlockSharedMemory() -> void; /** * * @param data pointer to data * @param size of data * @param offset where the data is written on the shared memory */ auto writeSharedMemory(char *data, int size, int offset) -> void; } #endif