Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Scientific Software
Takin
core
Commits
5db9043f
Verified
Commit
5db9043f
authored
Mar 16, 2021
by
Tobias WEBER
Browse files
sqw: testing interproc shm emulation
parent
c040589f
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
5db9043f
...
...
@@ -19,6 +19,7 @@ option(USE_RtMp "use auxilliary libraries" TRUE)
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
)
set
(
USE_TR1_FUNCS FALSE
)
set
(
BUILD_EXT_TOOLS FALSE
)
...
...
@@ -92,6 +93,12 @@ if(USE_CUSTOM_THREADPOOL)
endif
()
if
(
USE_INTERPROC_EMUL
)
message
(
"Using interprocess shared memory emulation mode."
)
add_definitions
(
-D__USE_SQW_INTERPROC_EMUL__
)
endif
()
list
(
APPEND CMAKE_MODULE_PATH
"
${
PROJECT_SOURCE_DIR
}
"
"."
"
${
PROJECT_SOURCE_DIR
}
/cmake"
"
${
PROJECT_SOURCE_DIR
}
/tlibs"
)
set
(
CMAKE_BINARY_DIR
"
${
CMAKE_SOURCE_DIR
}
"
)
...
...
tools/monteconvo/sqw_proc.h
View file @
5db9043f
...
...
@@ -8,6 +8,21 @@
#ifndef __SQW_PROC_H__
#define __SQW_PROC_H__
#ifdef __USE_SQW_INTERPROC_EMUL__
#include
<boost/interprocess/detail/workaround.hpp>
// try to avoid certain shared memory syscalls
#undef BOOST_INTERPROCESS_XSI_SHARED_MEMORY_OBJECTS
#undef BOOST_INTERPROCESS_POSIX_SHARED_MEMORY_OBJECTS
#undef BOOST_INTERPROCESS_FILESYSTEM_BASED_POSIX_SHARED_MEMORY
#undef BOOST_INTERPROCESS_RUNTIME_FILESYSTEM_BASED_POSIX_SHARED_MEMORY
// force using emulation mode instead:
// https://www.boost.org/doc/libs/1_75_0/doc/html/interprocess/sharedmemorybetweenprocesses.html#interprocess.sharedmemorybetweenprocesses.sharedmemory.emulation
#define BOOST_INTERPROCESS_FORCE_GENERIC_EMULATION
//#define BOOST_INTERPROCESS_SHARED_DIR_PATH "/tmp/shared_mem"
#endif
#include
"sqw.h"
#include
<mutex>
#include
<memory>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment