attributes.7: Remove some AS-Unsafe and AC-Unsafe text under 'init'

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2014-10-18 11:43:27 +02:00
parent 743c01ad28
commit bbc1f04ef5
1 changed files with 29 additions and 29 deletions

View File

@ -346,35 +346,35 @@ this specific cause for the function to be regarded as MT-Unsafe.
If no other cause for that remains,
the function can then be safely called after other threads are started.
Functions marked with
.I init
as an AS-Unsafe or AC-Unsafe feature use the GNU C Library internal
.I libc_once
machinery or similar to initialize internal data structures.
If a signal handler interrupts such an initializer,
and calls any function that also performs
.I libc_once
initialization, it will deadlock if the thread library has been loaded.
Furthermore, if an initializer is partially complete before it is canceled
or interrupted by a signal whose handler requires the same initialization,
some or all of the initialization may be performed more than once,
leaking resources or even resulting in corrupt internal data.
Applications that need to call functions marked with
.I init
as an AS-Safety or AC-Unsafe feature should ensure
the initialization is performed
before configuring signal handlers or enabling cancellation,
so that the AS-Safety and AC-Safety issues related with
.I libc_once
do not arise.
.\" We may have to extend the annotations to cover conditions in which
.\" initialization may or may not occur, since an initial call in a safe
.\" context is no use if the initialization doesn't take place at that
.\" time: it doesn't remove the risk for later calls.
.\" Functions marked with
.\" .I init
.\" as an AS-Unsafe or AC-Unsafe feature use the GNU C Library internal
.\" .I libc_once
.\" machinery or similar to initialize internal data structures.
.\"
.\" If a signal handler interrupts such an initializer,
.\" and calls any function that also performs
.\" .I libc_once
.\" initialization, it will deadlock if the thread library has been loaded.
.\"
.\" Furthermore, if an initializer is partially complete before it is canceled
.\" or interrupted by a signal whose handler requires the same initialization,
.\" some or all of the initialization may be performed more than once,
.\" leaking resources or even resulting in corrupt internal data.
.\"
.\" Applications that need to call functions marked with
.\" .I init
.\" as an AS-Safety or AC-Unsafe feature should ensure
.\" the initialization is performed
.\" before configuring signal handlers or enabling cancellation,
.\" so that the AS-Safety and AC-Safety issues related with
.\" .I libc_once
.\" do not arise.
.\"
.\" .\" We may have to extend the annotations to cover conditions in which
.\" .\" initialization may or may not occur, since an initial call in a safe
.\" .\" context is no use if the initialization doesn't take place at that
.\" .\" time: it doesn't remove the risk for later calls.
.TP
.I race
Functions annotated with