Verified Commit 6d43366f authored by Tobias WEBER's avatar Tobias WEBER
Browse files

added option to disable xsi syscalls

parent e44d38aa
......@@ -20,6 +20,7 @@ option(USE_Dl "use dl libraries" TRUE)
option(USE_Py "search for python" TRUE)
option(USE_CUSTOM_THREADPOOL "use custom threadpool implementation" FALSE)
option(USE_INTERPROC_EMUL "force shared memory emulation mode" FALSE)
option(DISABLE_INTERPROC_XSI "disable xsi shared memory syscalls" FALSE)
set(USE_TR1_FUNCS FALSE)
set(BUILD_EXT_TOOLS FALSE)
......@@ -99,6 +100,12 @@ if(USE_INTERPROC_EMUL)
endif()
if(DISABLE_INTERPROC_XSI)
message("Disabling xsi shared memory syscalls.")
add_definitions(-D__DISABLE_SQW_INTERPROC_XSI__)
endif()
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}" "."
"${PROJECT_SOURCE_DIR}/cmake" "${PROJECT_SOURCE_DIR}/tlibs")
set(CMAKE_BINARY_DIR "${CMAKE_SOURCE_DIR}")
......
......@@ -8,6 +8,7 @@
#ifndef __SQW_PROC_H__
#define __SQW_PROC_H__
// use filesystem based shared memory emulation
#ifdef __USE_SQW_INTERPROC_EMUL__
#include <boost/interprocess/detail/workaround.hpp>
......@@ -23,6 +24,14 @@
//#define BOOST_INTERPROCESS_SHARED_DIR_PATH "/tmp/shared_mem"
#endif
// disable xsi syscalls (shmat(), shmctl(), shmdt())
#ifdef __DISABLE_SQW_INTERPROC_XSI__
#include <boost/interprocess/detail/workaround.hpp>
// try to avoid certain shared memory syscalls
#undef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS
#endif
#include "sqw.h"
#include <mutex>
#include <memory>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment