diff --git a/src/SharedMemoryAccess.h b/src/SharedMemoryAccess.h index 16cde8b..514e46f 100644 --- a/src/SharedMemoryAccess.h +++ b/src/SharedMemoryAccess.h @@ -5,6 +5,7 @@ #ifndef LIBRARY_SHAREDMEMORYACCESSS_H #define LIBRARY_SHAREDMEMORYACCESSS_H +int initSemaphore(); /** * use lock and unlock when writing diff --git a/src/vkvm.cpp b/src/vkvm.cpp index c73c524..f137046 100644 --- a/src/vkvm.cpp +++ b/src/vkvm.cpp @@ -10,6 +10,7 @@ void initialize(int pid) { impl.sharedMemoryPid = pid; impl.sharedMemoryKey = 12345;// NOLINT impl.sharedMemorySize = 8000;// NOLINT + initSemaphore(); setDefaultValues(); }