Files
systemd/man/threads-aware.xml

24 lines
1.2 KiB
XML
Raw Permalink Normal View History

<?xml version="1.0"?>
2023-12-23 09:57:43 +01:00
<!DOCTYPE refsect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
<refsect1>
2023-12-23 10:05:38 +01:00
<title/>
2025-10-03 13:17:32 +02:00
<para id="strict">All functions listed here are thread-agnostic and only a single thread may operate on a
given object at any given time. Different threads may access the same object at different times. Multiple
independent objects may be used from different threads in parallel.</para>
2023-12-24 10:46:55 +01:00
<para id="safe">All functions listed here are thread-safe and may be called in parallel from multiple threads.</para>
2023-12-24 10:46:55 +01:00
<para id='getenv'>The code described here uses
<citerefentry project='man-pages'><refentrytitle>getenv</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
which is declared to be not multi-thread-safe. This means that the code calling the functions described
here must not call
<citerefentry project='man-pages'><refentrytitle>setenv</refentrytitle><manvolnum>3</manvolnum></citerefentry>
from a parallel thread. It is recommended to only do calls to <function>setenv()</function>
from an early phase of the program when no other threads have been started.</para>
</refsect1>