HP-UX Reference (11i v1 05/09) - 5 Miscellaneous Topics (vol 9)
t
thread_safety(5) thread_safety(5)
NAME
thread_safety - list of libc, libpthread, and libgen interfaces that are Not Thread-safe, Cancellation Points,
Cancel Safe, Async Signal Safe, or Async Cancel Safe
DESCRIPTION
Refer to this manpage when writing thread-safe applications using libc, libpthread and libgen interfaces.
This man page gives the list of libc, libpthread, and libgen interfaces that are: Not Thread-safe, Cancella-
tion Points, Cancel Safe, Async Signal Safe, and Async Cancel Safe.
Interfaces That Are Not Thread-safe
All the interfaces are thread-safe except:
bgets() bufsplit() copylist() dbmclose()
dbminit() delete() endmntent() fattach()
fdetach() fetch() firstkey() getc_unlocked()
getchar_unlocked() getcontext() getopt() inet_ntop()
inet_pton() isastream() makecontext() nextkey()
putc_unlocked() putchar_unlocked() setcontext() setmntent()
store() strord() strtold() swapcontext()
NOTE: If an interface has a _r counterpart, then the _r interface is thread-safe, and the non-
_r is
not thread-safe. The exceptions are
rand() and getgrnam() , for which both the _r and the non
_r counterparts are thread-safe.
Cancellation Points
Cancellation Points can occur when a thread is executing in the following interfaces:
_pututline() accept() aio_suspend()
bgets() catclose() catgets()
catopen() close() closedir()
closelog() confstr() connect()
copylist() creat() ctermid()
cuserid() dbm_close() dbm_delete()
dbm_fetch() dbm_firstkey() dbm_nextkey()
dbm_open() dbm_store() devnm()
dial() endgrent() endpwent()
endusershell() endutent() endutxent()
fclose() fcntl() fdopen()
fflush() fgetc() fgetpos()
fgetpwent() fgets() fgetwc()
fgetws() fopen() fprintf()
fputc() fputs() fputwc()
fputws() fread() freopen()
fscanf() fseek() fseeko()
fsetpos() fstatvfsdev() fsync()
ftell() ftello() ftw()
fwprintf() fwrite() fwscanf()
getc() getc_unlocked() getchar()
getchar_unlocked() getcwd() getdate()
getgrent() getgrgid() getgrgid_r()
getgrnam() getgrnam_r() getlogin()
getlogin_r() getmsg() getpmsg()
getpwent() getpwnam() getpwnam_r()
getpwuid() getpwuid_r() gets()
gettxt() getusershell() getutent()
getutid() getutline() getutxent()
getutxid() getutxline() getw()
getwc() getwchar() getwd()
glob() globfree() iconv()
iconv_close() iconv_open() initgroups()
HP-UX 11i Version 1: September 2005 − 1 − Hewlett-Packard Company Section 5−−371