mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-19 04:12:13 +00:00
FreeBSD support for _POSIX_THREAD_PROCESS_SHARED is incomplete and buggy, avoid it.
This commit is contained in:
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user