Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
thread_safety(5)	      File Formats Manual	      thread_safety(5)

NAME
       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
       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
       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 counterpart, then the interface is
	      thread-safe, and the non-is not thread-safe.

   Cancellation	Points
       Cancellation Points can occur when a thread is executing	in the follow-
       ing 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.

							      thread_safety(5)

NAME | DESCRIPTION | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=thread_safety&sektion=5&manpath=HP-UX+11.22>

home | help