[Prev] [Contents] [Next]

Mutex Synchronization APIs

Thread synchronization is required whenever two threads share a resource or need to be aware of what the other threads in a process are doing. Mutexes are the most simple and primitive object used for the co-operative mutual exclusion required to share and protect resources. One thread owns a mutex by locking it successfully, when another thread tries to lock the mutex, that thread will not be allowed to successfully lock the mutex until the owner unlocks it. The mutex support provides different types and behaviors for mutexes that can be tuned to your application requirements.
pthread_mutexattr_destroy()--Destroy Mutex Attributes Object
pthread_mutexattr_getkind_np()--Get Mutex Kind Attribute
pthread_mutexattr_getname_np()--Get Name from Mutex Attributes Object
pthread_mutexattr_getpshared()--Get Process Shared Attribute from Mutex Attributes Object
pthread_mutexattr_gettype()--Get Mutex Type Attribute
pthread_mutexattr_init()--Initialize Mutex Attributes Object
pthread_mutexattr_setkind_np()--Get Mutex Kind Attribute
pthread_mutexattr_setname_np()--Set Name in Mutex Attributes Object
pthread_mutexattr_setpshared()--Set Process Shared Attribute in Mutex Attributes Object
pthread_mutexattr_settype()--Set Mutex Type Attribute
pthread_set_mutexattr_default_np()--Set Default Mutex Attributes Object Kind Attribute
pthread_mutex_destroy()--Destroy Mutex
pthread_mutex_init()--Initialize Mutex
pthread_mutex_lock()--Lock Mutex
pthread_mutex_timedlock_np()--Lock Mutex with Time-out
pthread_mutex_trylock()--Lock Mutex with No Wait
pthread_mutex_unlock()--Unlock Mutex
pthread_lock_global_np()--Lock a Global Mutex
pthread_unlock_global_np()--Unlock a Global Mutex



[Prev] [Contents] [Next]
Copyright © 1998, IBM Corporation. All rights reserved.
Comments? Contact
rchthrds@us.ibm.com