pthdb_mutexattr_addr, pthdb_mutexattr_prioceiling, pthdb_mutexattr_protocol, pthdb_mutexattr_pshared or pthdb_mutexattr_type Subroutine

Purpose

Gets the mutex attribute pshared, priority ceiling, protocol, and type values.

Library

pthread debug library (libpthdebug.a)

Syntax

#include <sys/pthdebug.h>

int pthdb_mutexattr_addr (pthdb_session_t    session,
                                pthdb_mutexattr_t  mutexattr,
                                pthdb_addr_t  * addrp)

int pthdb_mutexattr_protocol (pthdb_session_t    session,
                              pthdb_mutexattr_t  mutexattr,
                              pthdb_protocol_t  * protocolp)

int pthdb_mutexattr_pshared (pthdb_session_t    session,
                             pthdb_mutexattr_t  mutexattr,
                             pthdb_pshared_t   * psharedp)

int pthdb_mutexattr_type (pthdb_session_t     session,
                          pthdb_mutexattr_t   mutexattr,
                          pthdb_mutex_type_t * typep)

Description

The pthdb_mutexattr_addr function reports the address of the pthread_mutexatt_t.

The pthdb_mutexattr_prioceiling function is used to get the mutex attribute priority ceiling value.

The pthdb_mutexattr_protocol function is used to get the mutex attribute protocol value. The protocol value can be MP_INHERIT, MP_PROTECT, MP_NONE, or MP_NOTSUP.

The pthdb_mutexattr_pshared function is used to get the mutex attribute process shared value. The pshared value can be PSH_SHARED, PSH_PRIVATE, or PSH_NOTSUP.

The pthdb_mutexattr_type is used to get the value of the mutex attribute 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 attribute address.
mutexattr Condition variable attribute handle
prioceiling Pointer to priority ceiling value.
protocolp Pointer to protocol value.
psharedp Pointer to pshared value.
session Session handle.
typep Pointer to type value.

Return Values

If successful, these functions return PTHDB_SUCCESS. Otherwise, an error code is returned.

Error Codes

Item Description
PTHDB_BAD_MUTEXATTR Invalid mutex attribute handle.
PTHDB_BAD_SESSION Invalid session handle.
PTHDB_CALLBACK Debugger call back error.
PTHDB_INTERNAL Error in library.
PTHDB_NOSYS Not implemented
PTHDB_POINTER Invalid pointer