pthdb_mutex_addr, pthdb_mutex_lock_count, pthdb_mutex_owner, pthdb_mutex_pshared, pthdb_mutex_prioceiling, pthdb_mutex_protocol, pthdb_mutex_state or pthdb_mutex_type Subroutine
Purpose
Gets the owner's pthread, mutex's pshared value, priority ceiling, protocol, lock state, and type.
Library
pthread debug library (libpthdebug.a)
Syntax
Description
pthdb_mutex_addr reports the address of the prhread_mutex_t.
pthdb_mutex_lock_count reports the lock count of the mutex.
pthdb_mutex_owner is used to get the pthread that owns the mutex.
The pthdb_mutex_pshared function is used to get the mutex process shared value. The pshared value can be PSH_SHARED, PSH_PRIVATE, or PSH_NOTSUP.
pthdb_mutex_prioceiling function is used to get the mutex priority ceiling value.
pthdb_mutex_protocol function is used to get the mutex protocol value. The protocol value can be MP_INHERIT, MP_PROTECT, MP_NONE, or MP_NOTSUP.
pthdb_mutex_state is used to get the value of the mutex lock state. The state can be MS_LOCKED, MS_UNLOCKED or MS_NOTSUP.
pthdb_mutex_type is used to get the value of the mutex type. The values for the mutex type can be MK_NONRECURSIVE_NP, MK_RECURSIVE_NP, MK_FAST_NP, MK_ERRORCHECK, MK_RECURSIVE, MK_NORMAL, or MK_NOTSUP.
Parameters
Item | Description |
---|---|
addr | Mutex address |
countp | Mutex lock count |
mutex | Mutex handle |
ownerp | Pointer to mutex owner |
psharedp | Pointer to pshared value |
prioceilingp | Pointer to priority ceiling value |
protocolp | Pointer to protocol value |
session | Session handle. |
statep | Pointer to mutex state |
typep | Pointer to mutex type |
Return Values
If successful, these functions return PTHDB_SUCCESS. Otherwise, an error code is returned.
Error Codes
Item | Description |
---|---|
PTHDB_BAD_MUTEX | Invalid mutex handle. |
PTHDB_BAD_SESSION | Invalid session handle. |
PTHDB_CALLBACK | Debugger call back error. |
PTHDB_INTERNAL | Call failed. |
PTHDB_NOSYS | Not implemented |
PTHDB_POINTER | Invalid pointer |