Naming Convention for the Threads Library

The identifiers used by the threads library follow a strict naming convention. All identifiers of the threads library begin with pthread_.

User programs should not use this prefix for private identifiers. This prefix is followed by a component name. The following components are defined in the threads library:

Component Description
pthread_ Threads themselves and miscellaneous subroutines
pthread_attr Thread attributes objects
pthread_cond Condition variables
pthread_condattr Condition attributes objects
pthread_key Thread-specific data keys
pthread_mutex Mutexes
pthread_mutexattr Mutex attributes objects

Data type identifiers end with _t. Subroutine and macro names end with an _ (underscore), followed by a name identifying the action performed by the subroutine or the macro. For example, pthread_attr_init is a threads library identifier (pthread_) that concerns thread attributes objects (attr) and is an initialization subroutine (_init).

Explicit macro identifiers are in uppercase letters. Some subroutines may, however, be implemented as macros, although their names are in lowercase letters.