summaryrefslogtreecommitdiff
path: root/man/sd_journal_get_catalog.xml
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2018-08-03 16:43:30 +0200
committerLennart Poettering <lennart@poettering.net>2018-08-03 17:36:11 +0200
commit64a7ef8bc06b5dcfcd9f99ea10a43bde75c4370f (patch)
treeab5905268e9686f76a5e9d35cd1352353bdfb8bc /man/sd_journal_get_catalog.xml
parentaf560fc1da26a7d0e94b0d56a3cd2a14d2b082c8 (diff)
downloadsystemd-64a7ef8bc06b5dcfcd9f99ea10a43bde75c4370f.tar.gz
man: be more explicit about thread safety of sd_journal
Triggered by https://bugzilla.redhat.com/show_bug.cgi?id=1609349 This adds two generic paragaphs we include via xinclude. One is the "strict" version, which contains wording saying that we are thread agnostic and what that means. And the other is the "safe" version, for the cases we provide fully safety. Let's then change most man pages to use either of these generic paragraphs. With one exception: man/sd_journal_get_catalog.xml contains both kinds of function, we hence use manual wording.
Diffstat (limited to 'man/sd_journal_get_catalog.xml')
-rw-r--r--man/sd_journal_get_catalog.xml11
1 files changed, 8 insertions, 3 deletions
diff --git a/man/sd_journal_get_catalog.xml b/man/sd_journal_get_catalog.xml
index ce37e177bd..80edc08c81 100644
--- a/man/sd_journal_get_catalog.xml
+++ b/man/sd_journal_get_catalog.xml
@@ -87,9 +87,14 @@
<refsect1>
<title>Notes</title>
- <para>Function <function>sd_journal_get_catalog()</function> is thread-agnostic and only a
- single thread may operate on a given <structname>sd_journal</structname> object. Function
- <function>sd_journal_get_catalog_for_message_id()</function> is thread-safe.</para>
+ <para>Function <function>sd_journal_get_catalog()</function> is 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>
+
+ <para>Function <function>sd_journal_get_catalog_for_message_id()</function> is are thread-safe and may be called in
+ parallel from multiple threads.</para>
<xi:include href="libsystemd-pkgconfig.xml" xpointer="pkgconfig-text"/>
</refsect1>