支持的接口

AIX®系统上,总是定义_POSIX_THREADS_POSIX_THREAD_ATTR_STACKADDR_POSIX_THREAD_ATTR_STACKSIZE_POSIX_THREAD_PROCESS_SHARED符号。

因此,支持以下线程接口。

POSIX 接口

以下是 POSIX 接口列表:
  • pthread_atfork
  • pthread_attr_destroy
  • pthread_attr_getdetachstate
  • pthread_attr_getschedparam
  • pthread_attr_getstacksize
  • pthread_attr_getstackaddr
  • pthread_attr_init
  • pthread_attr_setdetachstate
  • pthread_attr_setschedparam
  • pthread_attr_setstackaddr
  • pthread_attr_setstacksize
  • pthread_cancel
  • pthread_cleanup_pop
  • pthread_cleanup_push
  • pthread_detach
  • pthread_equal
  • pthread_exit
  • pthread_getspecific
  • pthread_join
  • pthread_key_create
  • pthread_key_delete
  • pthread_kill
  • pthread_mutex_destroy
  • pthread_mutex_init
  • pthread_mutex_lock
  • pthread_mutex_trylock
  • pthread_mutex_unlock
  • pthread_mutexattr_destroy
  • pthread_mutexattr_getpshared
  • pthread_mutexattr_init
  • pthread_mutexattr_setpshared
  • pthread_once
  • pthread_self
  • pthread_setcancelstate
  • pthread_setcanceltype
  • pthread_setspecific
  • pthread_sigmask
  • pthread_testcancel
  • pthread_cond_broadcast
  • pthread_cond_destroy
  • pthread_cond_init
  • pthread_cond_signal
  • pthread_cond_timedwait
  • pthread_cond_wait
  • pthread_condattr_destroy
  • pthread_condattr_getpshared
  • pthread_condattr_init
  • pthread_condattr_setpshared
  • pthread_create
  • sigwait

单一 UNIX 规范,第 2 版接口

以下是 Single UNIX Specification , Version 2 接口的列表:
  • pthread_attr_getguardsize
  • pthread_attr_setguardsize
  • pthread_getconcurrency
  • pthread_mutexattr_gettype
  • pthread_mutexattr_settype
  • pthread_rwlock_destroy
  • pthread_rwlock_init
  • pthread_rwlock_rdlock
  • pthread_rwlock_tryrdlock
  • pthread_rwlock_trywrlock
  • pthread_rwlock_unlock
  • pthread_rwlock_wrlock
  • pthread_rwlockattr_destroy
  • pthread_rwlockattr_getpshared
  • pthread_rwlockattr_init
  • pthread_rwlockattr_setpshared
  • pthread_setconcurrency
AIX 系统上,始终定义 _POSIX_THREAD_SAFE_FUNCTIONS 符号。 所以,始终支持以 下接口:
  • asctime_r
  • ctime_r
  • flockfile
  • ftrylockfile
  • funlockfile
  • getc_unlocked
  • getchar_unlocked
  • getgrgid_r
  • getgrnam_r
  • getpwnam_r
  • getpwuid_r
  • gmtime_r
  • localtime_r
  • putc_unlocked
  • putchar_unlocked
  • rand_r
  • readdir_r
  • strtok_r
AIX 不支持以下接口; 提供了符号,但它们始终返回错误并将 errno 设置为 ENOSYS:
  • pthread_mutex_getprioceiling
  • pthread_mutex_setprioceiling
  • pthread_mutexattr_getprioceiling
  • pthread_mutexattr_getprotocol
  • pthread_mutexattr_setprioceiling
  • pthread_mutexattr_setprotocol

非线程安全的界面

libc.a 库(标准函数):
  • advance
  • asctime
  • brk
  • catgets
  • chroot
  • 编译 (compile)
  • ctime
  • cuserid
  • dbm_clearerr
  • dbm_close
  • dbm_delete
  • dbm_error
  • dbm_fetch
  • dbm_firstkey
  • dbm_nextkey
  • dbm_open
  • dbm_store
  • dirname
  • drand48
  • ecvt
  • 加密 (encrypt)
  • endgrent
  • endpwent
  • endutxent
  • fcvt
  • gamma
  • gcvt
  • getc_unlocked
  • getchar_unlocked
  • getdate
  • getdtablesize
  • getgrent
  • getgrgid
  • getgrnam
  • getlogin
  • getopt
  • getpagesize
  • getpass
  • getpwent
  • getpwnam
  • getpwuid
  • getutxent
  • getutxid
  • getutxline
  • getw
  • getw
  • gmtime
  • l64a
  • lgamma
  • localtime
  • lrand48
  • mrand48
  • nl_langinfo
  • ptsname
  • putc_unlocked
  • putchar_unlocked
  • pututxline
  • putw
  • rand
  • random
  • readdir
  • re_comp
  • re_exec
  • regcmp
  • regex
  • sbrk
  • setgrent
  • setkey
  • setpwent
  • setutxent
  • sigstack
  • srand48
  • srandom
  • 步进
  • strerror
  • strtok
  • ttyname
  • ttyslot
  • wait3

以下 AIX 接口不是线程安全接口。

libc.a 库 (特定于AIX的函数):
  • endfsent
  • endttyent
  • endutent
  • getfsent
  • getfsfile
  • getfsspec
  • getfstype
  • getttyent
  • getttynam
  • getutent
  • getutid
  • getutline
  • pututline
  • setfsent
  • setttyent
  • setutent
  • utmpname
libbsd.a 库:
  • timezone

libm.alibmsaa.a 库:

  • gamma
  • lgamma
以下库中没有一个函数是线程安全的:
  • libPW.a
  • libblas.a
  • libcur.a
  • libcurses.a
  • libplot.a
  • libprint.a

如果向 ctermidtmpnam 接口传递了一个 NULL 参数,那么这两个接口不是线程安全的。

在多线程程序中,如果其中一个线程从模块初始化例程中调用 setlocale() 子例程,那么我们建议您不要同时从多个线程执行 setlocale() 子例程。

注: 某些子例程可以在某些系统上作为宏实现。 避免使用线程子例程的地址。