pthdb_cond_addr, pthdb_cond_mutex or pthdb_cond_pshared Subroutine

Purpose

Gets the condition variable's mutex handle and pshared value.

Library

pthread debug library (libpthdebug.a)

Syntax

#include <sys/pthdebug.h>

int  pthdb_cond_addr (pthdb_session_t  session,
                      pthdb_cond_t     cond,
                      pthdb_addr_t * addrp)

int  pthdb_cond_mutex (pthdb_session_t  session,
                       pthdb_cond_t     cond,
                       pthdb_mutex_t * mutexp)

int  pthdb_cond_pshared (pthdb_session_t  session,
                         pthdb_cond_t     cond,
                         pthdb_pshared_t * psharedp)

Description

The pthdb_cond_addr function reports the address of the pthdb_cond_t.

The pthdb_cond_mutex function is used to get the mutex handle associated with the particular condition variable, if the mutex does not exist then PTHDB_INVALID_MUTEX is returned from the mutex.

The pthdb_cond_pshared function is used to get the condition variable process shared value. The pshared value can be PSH_SHARED, PSH_PRIVATE, or PSH_NOTSUP.

Parameters

Item Description
addr Condition variable address
cond Condition variable handle
mutexp Pointer to mutex
psharedp Pointer to pshared value
session Session handle.

Return Values

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

Error Codes

Item Description
PTHDB_BAD_COND Invalid cond handle.
PTHDB_BAD_SESSION Invalid session handle.
PTHDB_CALLBACK Debugger call back error.
PTHDB_INVALID_MUTEX Invalid mutex.
PTHDB_INTERNAL Error in library.
PTHDB_POINTER Invalid pointer