Skip to content

Commit 37e334e

Browse files
committed
Rework documentation for systems that do not fully support process-shared features
1 parent e006a65 commit 37e334e

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

doc/interprocess.qbk

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6730,9 +6730,9 @@ Please take in care that, for XSI synchronization primitives (e.g. `xsi_shared_m
67306730

67316731
[endsect]
67326732

6733-
[section:notes_linux Notes for Linux users]
6733+
[section:notes_unix Notes for Unix users]
67346734

6735-
[section:notes_linux_shm_folder Shared memory emulation folder]
6735+
[section:notes_unix_shm_folder Shared memory emulation folder]
67366736

67376737
On systems without POSIX shared memory support, shared memory objects are implemented as memory mapped files, using a directory
67386738
placed in "/tmp" that can include (if `BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME` is defined) the last bootup time (if the OS supports it).
@@ -6753,6 +6753,10 @@ to determine the shared directory at runtime, define `BOOST_INTERPROCESS_SHARED_
67536753

67546754
[endsect]
67556755

6756+
[endsect]
6757+
6758+
[section:notes_linux Notes for Linux users]
6759+
67566760
[section:notes_linux_overcommit Overcommit]
67576761

67586762
The committed address space is the total amount of virtual memory (swap or physical memory/RAM) that the kernel might have to supply
@@ -6774,25 +6778,15 @@ change this overcommit behaviour.
67746778

67756779
[endsect]
67766780

6777-
[section:notes_freebsd Notes for FreeBSD users]
6778-
6779-
[section:notes_freebsd_umtx_vnode_persistent Process-shared synchronization primitives and ['kern.ipc.umtx_vnode_persistent]]
6780-
6781-
Starting from FreeBSD 11, declares the macro _POSIX_THREAD_PROCESS_SHARED. However, the default behavior is different from the one on Linux.
6782-
If you want to use this feature, according to the man page of libthr(3), you should check sysctl's ['kern.ipc.umtx_vnode_persistent]:
6781+
[section:notes_macos_bsd Notes for MacOS and BSD users]
67836782

6784-
* ['kern.ipc.umtx_vnode_persistent]: By default, a shared lock backed by a mapped file in memory is automatically destroyed on the last
6785-
unmap of the corresponding file's page, which is allowed by POSIX. Setting the sysctl to 1 makes such a shared lock object persist until
6786-
the vnode is recycled by the Virtual File System. Note that in case file is not opened and not mapped, the kernel might recycle it at
6787-
any moment, making this sysctl less useful than it sounds.
6788-
6789-
If you want mapped files to remain useful after the last handle is closed, set this variable to 1.
6790-
6791-
[endsect]
6783+
Support for _POSIX_THREAD_PROCESS_SHARED is inexistent (OpenBSD/NetBSD, old FreeBSD) or incomplete/buggy (FreeBSD>=11, MacOS).
6784+
Process-shared synchronization primitives are emulated with atomics, which have suboptimal performance and are unrecoverable
6785+
under process crashes while holding the lock.
67926786

67936787
[endsect]
67946788

6795-
[section:notes_freebsd Notes for MacOs users]
6789+
[section:notes_macos Notes for MacOs users]
67966790

67976791
[section:notes_macos_sandboxed Limitations for sandboxed applications]
67986792

@@ -6808,6 +6802,12 @@ Please see Apple documentation
68086802

68096803
[endsect]
68106804

6805+
[section:notes_other_xsi Notes for QNX, Android, Haiku, VxWorks and Emscriptem users]
6806+
6807+
Those operating system don't offer support XSI IPC mechanisms, so associated utilities are not available.
6808+
6809+
[endsect]
6810+
68116811
[endsect]
68126812

68136813
[section:thanks_to Thanks to...]

0 commit comments

Comments
 (0)