diff --git a/man7/attributes.7 b/man7/attributes.7 index e9e4edefa..945b6ac42 100644 --- a/man7/attributes.7 +++ b/man7/attributes.7 @@ -61,52 +61,52 @@ The documented MT-Safety status is not guaranteed under whole-program optimization. However, functions defined in user-visible headers are designed to be safe for inlining. -.TP -.I AS-Safe -.I AS-Safe -or Async-Signal-Safe functions are safe to call from -asynchronous signal handlers. -AS, in AS-Safe, stands for Asynchronous Signal. +.\" .TP +.\" .I AS-Safe +.\" .I AS-Safe +.\" or Async-Signal-Safe functions are safe to call from +.\" asynchronous signal handlers. +.\" AS, in AS-Safe, stands for Asynchronous Signal. +.\" +.\" Many functions that are AS-Safe may set +.\" .IR errno , +.\" or modify the floating-point environment, +.\" because their doing so does not make them +.\" unsuitable for use in signal handlers. +.\" However, programs could misbehave should asynchronous signal handlers +.\" modify this thread-local state, +.\" and the signal handling machinery cannot be counted on to +.\" preserve it. +.\" Therefore, signal handlers that call functions that may set +.\" .I errno +.\" or modify the floating-point environment +.\" .I must +.\" save their original values, and restore them before returning. +.\" .TP +.\" .I AC-Safe +.\" .I AC-Safe +.\" or Async-Cancel-Safe functions are safe to call when +.\" asynchronous cancellation is enabled. +.\" AC in AC-Safe stands for Asynchronous Cancellation. +.\" +.\" The POSIX standard defines only three functions to be AC-Safe, namely +.\" .BR pthread_cancel (3), +.\" .BR pthread_setcancelstate (3), +.\" and +.\" .BR pthread_setcanceltype (3). +.\" At present the GNU C Library provides no +.\" guarantees beyond these three functions, +.\" but does document which functions are presently AC-Safe. +.\" This documentation is provided for use +.\" by the GNU C Library developers. -Many functions that are AS-Safe may set -.IR errno , -or modify the floating-point environment, -because their doing so does not make them -unsuitable for use in signal handlers. -However, programs could misbehave should asynchronous signal handlers -modify this thread-local state, -and the signal handling machinery cannot be counted on to -preserve it. -Therefore, signal handlers that call functions that may set -.I errno -or modify the floating-point environment -.I must -save their original values, and restore them before returning. -.TP -.I AC-Safe -.I AC-Safe -or Async-Cancel-Safe functions are safe to call when -asynchronous cancellation is enabled. -AC in AC-Safe stands for Asynchronous Cancellation. - -The POSIX standard defines only three functions to be AC-Safe, namely -.BR pthread_cancel (3), -.BR pthread_setcancelstate (3), -and -.BR pthread_setcanceltype (3). -At present the GNU C Library provides no -guarantees beyond these three functions, -but does document which functions are presently AC-Safe. -This documentation is provided for use -by the GNU C Library developers. - -Just like signal handlers, cancellation cleanup routines must configure -the floating point environment they require. -The routines cannot assume a floating point environment, -particularly when asynchronous cancellation is enabled. -If the configuration of the floating point -environment cannot be performed atomically then it is also possible that -the environment encountered is internally inconsistent. +.\" Just like signal handlers, cancellation cleanup routines must configure +.\" the floating point environment they require. +.\" The routines cannot assume a floating point environment, +.\" particularly when asynchronous cancellation is enabled. +.\" If the configuration of the floating point +.\" environment cannot be performed atomically then it is also possible that +.\" the environment encountered is internally inconsistent. .TP .IR MT-Unsafe ", " AS-Unsafe ", " AC-Unsafe .IR MT-Unsafe ", " AS-Unsafe ", " AC-Unsafe