The Pthreads Library Module (f_pthread) is a Fortran 90 module that defines data types and routines to make it easier to interface with the AIX pthreads library. The AIX pthreads library is used to parallelize and thread-safe your code. The f_pthread library module naming convention is the use of the prefix f_ before the corresponding AIX pthreads library routine name or type definition name.
AIX Version 4.3 and higher supports both the default POSIX 1003.1-1996 standard, and the Draft 7 POSIX pthreads API. Depending on which invocation command you use, you can compile and link your programs with either the POSIX 1003.1-1996 standard, or the Draft 7 interface libraries. For more information about how to do this, see "Compiling Multi-Threaded Programs" and "Linking Multi-Threaded Programs Using the "ld" Command" in the User's Guide.
In general, there is a one-to-one corresponding relationship between the procedures in the Fortran 90 module f_pthread and the library routines contained in the AIX pthreads library. However, some of the pthread routines have no corresponding procedures in this module because they are not supported on AIX. One example of these routines is the thread stack address option. There are also some non-pthread interfacing routines contained in the f_pthread library module. The f_maketime routine is one example and is included to return an absolute time in a f_timespec derived type variable.
Most of the routines return an integer value. A return value of 0 will always indicate that the routine call did not result in any error. Any non-zero return value indicates an error. Each error code has a corresponding definition of a system error code in Fortran. These error codes are available as Fortran integer constants. The naming of these error codes in Fortran is consistent with the corresponding AIX error code names. For example, EINVAL is the Fortran constant name of the error code EINVAL on AIX. For a complete list of these error codes, refer to the file /usr/include/sys/errno.h on AIX.
For more information about the system calls corresponding to the Fortran Pthreads library calls, see the AIX Operating System documentation.