From bbc1f04ef59d8f6027bb2af4548e128964300a1a Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Sat, 18 Oct 2014 11:43:27 +0200 Subject: [PATCH] attributes.7: Remove some AS-Unsafe and AC-Unsafe text under 'init' Signed-off-by: Michael Kerrisk --- man7/attributes.7 | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/man7/attributes.7 b/man7/attributes.7 index ac50f6c21..83db06185 100644 --- a/man7/attributes.7 +++ b/man7/attributes.7 @@ -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