mirror of https://github.com/mkerrisk/man-pages
Add list of thread-safe functions.
This commit is contained in:
parent
da5461a83e
commit
0d07ad302a
104
man7/pthreads.7
104
man7/pthreads.7
|
@ -106,6 +106,110 @@ capabilities (see
|
|||
.IP \- 3
|
||||
CPU affinity
|
||||
.RB ( sched_setaffinity (2))
|
||||
.SS "Thread-safe functions"
|
||||
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:
|
||||
.\" FIXME . SUSv4 removes ecvt(), fcvt(), gcvt(), gethostbyname(), and
|
||||
.\" gethostbyaddr(), since they are removed from the standard, and
|
||||
.\" and adds strerror() and system().
|
||||
.in +4n
|
||||
.nf
|
||||
|
||||
asctime()
|
||||
basename()
|
||||
catgets()
|
||||
crypt()
|
||||
ctermid() if passed a non-NULL argument
|
||||
ctime()
|
||||
dbm_clearerr()
|
||||
dbm_close()
|
||||
dbm_delete()
|
||||
dbm_error()
|
||||
dbm_fetch()
|
||||
dbm_firstkey()
|
||||
dbm_nextkey()
|
||||
dbm_open()
|
||||
dbm_store()
|
||||
dirname()
|
||||
dlerror()
|
||||
drand48()
|
||||
ecvt()
|
||||
encrypt()
|
||||
endgrent()
|
||||
endpwent()
|
||||
endutxent()
|
||||
fcvt()
|
||||
ftw()
|
||||
gcvt()
|
||||
getc_unlocked()
|
||||
getchar_unlocked()
|
||||
getdate()
|
||||
getenv()
|
||||
getgrent()
|
||||
getgrgid()
|
||||
getgrnam()
|
||||
gethostbyaddr()
|
||||
gethostbyname()
|
||||
gethostent()
|
||||
getlogin()
|
||||
getnetbyaddr()
|
||||
getnetbyname()
|
||||
getnetent()
|
||||
getopt()
|
||||
getprotobyname()
|
||||
getprotobynumber()
|
||||
getprotoent()
|
||||
getpwent()
|
||||
getpwnam()
|
||||
getpwuid()
|
||||
getservbyname()
|
||||
getservbyport()
|
||||
getservent()
|
||||
getutxent()
|
||||
getutxid()
|
||||
getutxline()
|
||||
gmtime()
|
||||
hcreate()
|
||||
hdestroy()
|
||||
hsearch()
|
||||
inet_ntoa()
|
||||
l64a()
|
||||
lgamma()
|
||||
lgammaf()
|
||||
lgammal()
|
||||
localeconv()
|
||||
localtime()
|
||||
lrand48()
|
||||
mrand48()
|
||||
nftw()
|
||||
nl_langinfo()
|
||||
ptsname()
|
||||
putc_unlocked()
|
||||
putchar_unlocked()
|
||||
putenv()
|
||||
pututxline()
|
||||
rand()
|
||||
readdir()
|
||||
setenv()
|
||||
setgrent()
|
||||
setkey()
|
||||
setpwent()
|
||||
setutxent()
|
||||
strerror()
|
||||
strtok()
|
||||
tmpnam() if passed a non-NULL argument
|
||||
ttyname()
|
||||
unsetenv()
|
||||
wcrtomb() if its final argument is NULL
|
||||
wcsrtombs() if its final argument is NULL
|
||||
wcstombs()
|
||||
wctomb()
|
||||
.fi
|
||||
.in
|
||||
.SS "Compiling on Linux"
|
||||
On Linux, programs that use the Pthreads API should be compiled using
|
||||
.IR "cc \-pthread" .
|
||||
|
|
Loading…
Reference in New Issue