Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
HP-UX Reference > t

thread_safety(5)

HP-UX 11i Version 1: September 2005
» 

Technical documentation

» Feedback
Content starts here

 » Table of Contents

 » Index

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, Cancellation 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()
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()
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()
setgrent()setpwent()setusershell()
setutent()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()usleep()utmpname()
vfprintf()vfscanf()vfwprintf()
vpfmt()vprintf()vscanf()
vwprintf()wait()wait3()
waitid()waitpid()wordexp()
wordfree()wprintf()write()
writev()wscanf() 

Cancel Safe

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

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()
umask()uname()unlink()utime()
wait()waitpid()write() 

Async Cancel Safe

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()
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

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.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© 1983-2005 Hewlett-Packard Development Company, L.P.