diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index efde576..bb4ce1a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -927,10 +927,6 @@ jobs: then echo "Executing: sudo pkg git bash python3 curl" sudo pkg install -y git bash python3 curl - # Enable persistent umtx for vnode-backed shared memory synchronization - # This is needed for process-shared pthread mutexes in memory-mapped files - echo "Setting kern.ipc.umtx_vnode_persistent=1" - sudo sysctl kern.ipc.umtx_vnode_persistent=1 fi if [ "${{matrix.vm}}" == "openbsd" ] then diff --git a/include/boost/interprocess/detail/workaround.hpp b/include/boost/interprocess/detail/workaround.hpp index c064142..f3ce418 100644 --- a/include/boost/interprocess/detail/workaround.hpp +++ b/include/boost/interprocess/detail/workaround.hpp @@ -65,6 +65,14 @@ //https://opensource.apple.com/source/libpthread/libpthread-301.30.1/src/pthread_cond.c.auto.html //in method pthread_cond_wait #define BOOST_INTERPROCESS_BUGGY_POSIX_PROCESS_SHARED + #elif defined(__FreeBSD__) + //The FreeBSD implementation is not workable for Interprocess as data structures + //hold raw pointers and even "kern.ipc.umtx_vnode_persistent" does not solve this issue + //because de vnode will be recycled anyway since it is only useful when: + // - Multiple processes have the file mapped **simultaneously** + // - The kernel needs to coordinate their wait queues + //See (https://man.freebsd.org/cgi/man.cgi?query=libthr) for details + #define BOOST_INTERPROCESS_BUGGY_POSIX_PROCESS_SHARED #endif //If buggy _POSIX_THREAD_PROCESS_SHARED is detected avoid using it