Primitive data types for Pthreads

The Pthread types and functions have the following naming conventions. If the type of object is not a thread, object represents the type of object, action is an operation to be performed on the object, np or NP indicates that the name or symbol is a non-portable extension to the API set, and PURPOSE indicates the use or purpose of the symbol.

types
pthread[_object][_np]_t

functions
pthread[_object]_action[_np]

Constants and Macros
PTHREAD_PURPOSE[_NP]
Type Description
pthread_attr_t Thread creation attribute
pthread_cleanup_entry_np_t Cancellation cleanup handler entry
pthread_condattr_t Condition variable creation attribute
pthread_cond_t Condition Variable synchronization primitive
pthread_joinoption_np_t Options structure for extensions to pthread_join()
pthread_key_t Thread local storage key
pthread_mutexattr_t Mutex creation attribute
pthread_mutex_t Mutex (Mutual exclusion) synchronization primitive
pthread_once_t Once time initialization control variable
pthread_option_np_t Pthread run-time options structure
pthread_rwlockattr_t Read/Write lock attribute
pthread_rwlock_t Read/Write synchronization primitive
pthread_t Pthread handle
pthread_id_np_t Thread ID. For use as an integral type.
struct sched_param Scheduling parameters (priority and policy)

After creating the primitive objects of type pthread_cond_t and pthread_mutex_t using the appropriate initialization functions, those objects must not be copied or moved to a new location. If the condition variable or mutex is copied or moved to a new location, the new primitive object is not valid or usable. Attempts to use the new object result in the EINVAL error.


Top | Pthread APIs | APIs by category