2018-08-03 22:43:30 +08:00
|
|
|
<?xml version="1.0"?>
|
2023-12-23 16:57:43 +08:00
|
|
|
<!DOCTYPE refsect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
2019-03-14 21:40:58 +08:00
|
|
|
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
|
2020-11-09 12:23:58 +08:00
|
|
|
<!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
|
2018-08-03 22:43:30 +08:00
|
|
|
|
|
|
|
<refsect1>
|
2023-12-23 17:05:38 +08:00
|
|
|
<title/>
|
2018-08-03 22:43:30 +08:00
|
|
|
|
2023-12-24 17:46:55 +08:00
|
|
|
<para id="strict">All functions listed here are thread-agnostic and only a single specific thread may operate on a
|
|
|
|
given object during its entire lifetime. It's safe to allocate multiple independent objects and use each from a
|
|
|
|
specific thread in parallel. However, it's not safe to allocate such an object in one thread, and operate or free it
|
|
|
|
from any other, even if locking is used to ensure these threads don't operate on it at the very same time.</para>
|
2018-08-03 22:43:30 +08:00
|
|
|
|
2023-12-24 17:46:55 +08:00
|
|
|
<para id="safe">All functions listed here are thread-safe and may be called in parallel from multiple threads.</para>
|
2018-08-03 22:43:30 +08:00
|
|
|
|
2023-12-24 17:46:55 +08: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>
|
2023-03-08 03:25:58 +08:00
|
|
|
|
2018-08-03 22:43:30 +08:00
|
|
|
</refsect1>
|