thread_safety(5) thread_safety(5)
NAME [Toc] [Back]
thread_safety - list of libc, libpthread and libgen interfaces which
are: Not thread-safe, Cancellation Points, Cancel Safe, Async Signal
Safe, and Async Cancel Safe
DESCRIPTION [Toc] [Back]
Refer to this man page when writing thread-safe applications using
libc, libpthread and libgen interfaces. This man page gives the list
of libc, libpthread and libgen interfaces which are: Not thread-safe,
Cancellation Points, Cancel Safe, Async Signal Safe, and Async Cancel
Safe.
Interfaces That Are Not thread-safe [Toc] [Back]
All the interfaces are thread-safe except:
bgets() bufsplit() copylist() dbmclose()
dbminit() delete() endmntent() fattach()
fdetach() fetch() firstkey() getc_unlocked()
getchar_unlocked() getopt() inet_ntop() inet_pton()
isastream() nextkey() putc_unlocked() putchar_unlocked()
setmntent() store() strord() strtold()
NOTE: If an interface has a _r counterpart, then the _r interface
is thread-safe, and the non-_r is not thread-safe.
Cancellation Points [Toc] [Back]
Cancellation Points can occur when a thread is executing in the
following interfaces:
_pututline() accept() aio_suspend()
bgets() bwtmpname() 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() endbwent()
endgrent() endpwent() endusershell()
endutent() endutsent() 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()
getbwent() getc() getc_unlocked()
Hewlett-Packard Company - 1 - HP-UX 11i Version 2: August 2003
thread_safety(5) thread_safety(5)
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() getutsent() getutsid()
getutsline() getutspid() getutxid()
getutxline() getw() getwc()
getwchar() getwd() glob()
globfree() iconv() iconv_close()
iconv_open() initgroups() insque()
ioctl() isastream() lckpwdf()
lockf() lockf64() lseek()
lseek64() mkstemp() msgrcv()
msgsnd() msync() nanosleep()
nftw() nftw2() open()
opendir() openlog() pause()
pclose() perror() pfmt()
poll() popen() pread()
printf() pthread_cond_timedwait() pthread_cond_wait()
pthread_join() pthread_testcancel() putc()
putc_unlocked() putchar() putchar_unlocked()
putmsg() putpmsg() putpwent()
puts() pututline() pututsline()
pututxline() putw() putwc()
putwchar() putws() pwrite()
read() readdir() readdir_r()
readv() recv() recvfrom()
recvmsg() remove() remque()
rename() rewind() rewinddir()
scandir() scanf() seekdir()
select() semop() send()
sendmsg() sendto() sendfile()
setbwent() setgrent() setpwent()
setusershell() setutent() setutsent()
setutxent() sigpause() sigsuspend()
sigtimedwait() sigwait() sigwaitinfo()
sleep() socket() socketpair()
statvfsdev() strerror() syslog()
system() tcdrain() tmpfile()
tmpnam() ttyname() ttyname_r()
ttyslot() ulckpwdf() undial()
ungetc() ungetwc() unlink()
updatebwdb() usleep() utmpname()
vfprintf() vfscanf() vfwprintf()
vpfmt() vprintf() vscanf()
vwprintf() wait() wait3()
waitid() waitpid() wordexp()
Hewlett-Packard Company - 2 - HP-UX 11i Version 2: August 2003
thread_safety(5) thread_safety(5)
wordfree() wprintf() write()
writev() wscanf()
Cancel Safe [Toc] [Back]
All the following interfaces are Cancel Safe:
accept() bind() connect() dn_comp()
dn_expand() endhostent() endnetent() endprotoent()
endservent() get_resfield() gethostbyaddr() gethostbyname()
gethostent() getmsg() getnetbyaddr() getnetbyname()
getnetent() getpeername() getpmsg() getprotobyname()
getprotobynumber() getprotoent() getservbyname() getservbyport()
getservent() getsockname() getsockopt() herror()
inet_addr() inet_lnaof() inet_makeaddr() inet_netof()
inet_network() inet_ntoa() isastream() listen()
msync() net_aton() net_ntoa() poll()
putmsg() putpmsg() rcmd() recv()
recvfrom() recvmsg() res_init() res_mkquery()
res_query() res_search() res_send() rexec()
rresvport() ruserok() sbrk() send()
sendfile() sendmsg() sendto() set_resfield()
sethostent() setnetent() setprotoent() setservent()
setsockopt() shutdown() socket() socketpair()
Async Signal Safe [Toc] [Back]
All the following interfaces are Async Signal Safe:
_exit() accept() access() alarm()
bind() cfgetispeed() cfgetospeed() cfsetispeed()
cfsetospeed() chdir() chmod() chown()
close() connect() creat() dup()
dup2() execle() execve() fcntl()
fpathconf() fstat() getegid() geteuid()
getgid() getgroups() getmsg() getpeername()
getpgrp() getpid() getpmsg() getppid()
getsockname() getsockopt() getuid() isastream()
kill() link() listen() lseek()
mkdir() mkfifo() msync() net_aton()
net_ntoa() open() pathconf() pause()
pipe() poll() putmsg() putpmsg()
raise() read() recv() recvfrom()
recvmsg() rename() rmdir() sbrk()
send() sendfile() sendmsg() sendto()
setgid() setpgid() setsid() setsockopt()
setuid() shutdown() sigaction() sigaddset()
sigdelset() sigemptyset() sigfillset() sigismember()
signal() sigpending() sigprocmask() sigqueue()
sigsuspend() sleep() socket() socketpair()
stat() sysconf() tcdrain() tcflow()
tcflush() tcgetattr() tcgetpgrp() tcsendbreak()
tcsetattr() tcsetpgrp() time() times()
Hewlett-Packard Company - 3 - HP-UX 11i Version 2: August 2003
thread_safety(5) thread_safety(5)
umask() uname() unlink() utime()
wait() waitpid() write()
Async Cancel Safe [Toc] [Back]
All the following interfaces are Async Cancel Safe:
a64l() abs() accept()
addmntent() atof() atoi()
atol() bcmp() bcopy()
bind() bsearch() bzero()
cfgetispeed() cfgetospeed() cfsetispeed()
cfsetospeed() connect() div()
execv() execve() ffs()
fnmatch() fsetaclentry() ftok()
getclock() getmsg() getpeername()
getpmsg() getrlimit() getsockname()
getsockopt() getsubopt() index()
insque() isalnum() isalpha()
isascii() isastream() iscntrl()
isdigit() isgraph() islower()
isprint() ispunct() isspace()
isupper() iswalnum() iswalpha()
iswcntrl() iswctype() iswdigit()
iswgraph() iswlower() iswprint()
iswpunct() iswspace() iswupper()
iswxdigit() isxdigit() l3tol()
labs() ldiv() lfind()
listen() lsearch() ltol3()
mblen() mbstowcs() mbtowc()
memccpy() memchr() memcmp()
memcpy() memmove() memset()
mkfifo() mktemp() msem_init()
msem_lock() msgrcv() msgsnd()
msync() nanosleep() net_aton()
net_ntoa() pathfind() pause()
poll() pstat() pstat_getlwp()
pthread_cancel() pthread_setcancelstate() pthread_setcanceltype()
putmsg() putpmsg() recv()
recvfrom() recvmsg() remque()
rindex() rmdirp() sbrk()
semop() send() sendfile()
sendmsg() sendto() setaclentry()
setcat() setclock() setrlimit()
setsockopt() shutdown() sigsuspend()
socket() socketpair() strcasecmp()
strcat() strchr() strcmp()
strcoll() strcpy() strcspn()
strdup() strlen() strncasecmp()
strncat() strncmp() strncpy()
strord() strpbrk() strrchr()
strrstr() strspn() strstr()
Hewlett-Packard Company - 4 - HP-UX 11i Version 2: August 2003
thread_safety(5) thread_safety(5)
strtod() strtok_r() strtol()
strtold() strtoul() strxfrm()
swab() tcdrain() tcflow()
tcflush() tcgetattr() tcgetpgrp()
tcgetsid() tcsendbreak() tcsetattr()
tcsetpgrp() toascii() tolower()
toupper() towlower() towupper()
ulimit() wait() wait3()
waitid() wcscat() wcschr()
wcscmp() wcscpy() wcscspn()
wcslen() wcsncat() wcsncmp()
wcsncpy() wcspbrk() wcsrchr()
wcsspn() wcsstr() wcstod()
wcstok() wcstol() wcstombs()
wcstoul() wcswcs() wctomb()
wctype()
SEE ALSO [Toc] [Back]
intro(3C), pthread(3T), signal(5).
Refer to the threads white papers at the http://www.devresource.hp.com
and http://www.docs.hp.com web sites.
Hewlett-Packard Company - 5 - HP-UX 11i Version 2: August 2003 [ Back ] |