From 447cd9e76e4849effff93662ad38f1ce4fe45efe Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Tue, 11 Nov 2008 10:08:21 -0500 Subject: [PATCH] pthreads.7: Rework, and fix small error in, thread-safe function list Integrate the changes that occurred in POSIX.1-2008 into the main list (to be consistent with the list, elsewhere on this page, of functions that are cancellation points). Also, fix an error that said that strerror() was added to the list in POSIX.1-2008. It was strsignal() that was added. (strerror() was already in the list in POSIX.1-2001.) Signed-off-by: Michael Kerrisk --- man7/pthreads.7 | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/man7/pthreads.7 b/man7/pthreads.7 index 9f2af2c53..775c4bf9f 100644 --- a/man7/pthreads.7 +++ b/man7/pthreads.7 @@ -132,8 +132,9 @@ A thread-safe function is one that can be safely (i.e., it will deliver the same results regardless of whether it is) called from multiple threads at the same time. -POSIX.1-2001 requires that all functions specified in the standard -shall be thread-safe, except for the following functions: +POSIX.1-2001 and POSIX.1-2008 require that all functions specified +in the standard shall be thread-safe, +except for the following functions: .in +4n .nf @@ -155,14 +156,14 @@ dbm_store() dirname() dlerror() drand48() -ecvt() +ecvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)] encrypt() endgrent() endpwent() endutxent() -fcvt() +fcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)] ftw() -gcvt() +gcvt() [POSIX.1-2001 only (function removed in POSIX.1-2008)] getc_unlocked() getchar_unlocked() getdate() @@ -170,8 +171,8 @@ getenv() getgrent() getgrgid() getgrnam() -gethostbyaddr() -gethostbyname() +gethostbyaddr() [POSIX.1-2001 only (function removed in POSIX.1-2008)] +gethostbyname() [POSIX.1-2001 only (function removed in POSIX.1-2008)] gethostent() getlogin() getnetbyaddr() @@ -218,7 +219,9 @@ setkey() setpwent() setutxent() strerror() +strsignal() [Added in POSIX.1-2008] strtok() +system() [Added in POSIX.1-2008] tmpnam() if passed a non-NULL argument ttyname() unsetenv() @@ -228,11 +231,6 @@ wcstombs() wctomb() .fi .in -.PP -POSIX.1-2008 removes ecvt(), fcvt(), gcvt(), gethostbyname(), -and gethostbyaddr() from the above list -(because those functions are removed from the standard), and adds -strerror() and system(). .SS Cancellation Points POSIX.1 specifies that certain functions must, and certain other functions may, be cancellation points.