[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
Base Operating System and Extensions Technical Reference, Volume 1

pthdb_mutex_waiter, pthdb_cond_waiter, pthdb_rwlock_read_waiter or pthdb_rwlock_write_waiter Subroutine

Purpose

Gets the next waiter in the list of an object's waiters.

Library

pthread debug library (libpthdebug.a)

Syntax

#include <sys/pthdebug.h>

int pthdb_mutex_waiter (pthdb_session_t session,
                        pthdb_mutex_t   mutex,
                        pthdb_pthread_t *waiter,
	                int             cmd);
int  pthdb_cond_waiter (pthdb_session_t session,
                        pthdb_cond_t    cond,
                        pthdb_pthread_t *waiter,
                        int             cmd)
int *pthdb_rwlock_read_waiter (pthdb_session_t session,
                               pthdb_rwlock_t  rwlock,
                               pthdb_pthread_t *waiter,
                               int             cmd)
int *pthdb_rwlock_write_waiter (pthdb_session_t session,
                                pthdb_rwlock_t  rwlock,
                                pthdb_pthread_t *waiter,
                                int             cmd)

Description

The pthdb_mutex_waiter functions get the next waiter in the list of an object's waiters. The lists are reset when pthdb_session_update is called, or when a PTHDB_LIST_FIRST is passed for the cmd parameter, or after PTHDB_END has been returned. The cmd parameter can have the value PTHDB_LIST_NEXT or PTHDB_LIST_FIRST. When PTHDB_LIST_FIRST is passed for the cmd parameter, the first item in the list is retrieved.

A report of PTHDB_INVALID_OBJECT represents the empty list or the end of a list, where OBJECT is one of these values: PTHREAD, ATTR, MUTEX, MUTEXATTR, COND, CONDATTR, RWLOCK, RWLOCKATTR, KEY, or TID as appropriate.

Parameters

session Session handle.
mutex Mutex object.
cond Condition variable object.
cmd Reset to the beginning of the list.
rwlock Read/Write lock object.
waiter Pointer to waiter.

Return Values

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

Error Codes

PTHDB_BAD_SESSION Invalid session handle.
PTHDB_BAD_CMD Invalid command.
PTHDB_CALLBACK Debugger call back error.
PTHDB_INTERNAL Error in library.
PTHDB_MEMORY Not enough memory
PTHDB_POINTER Invalid pointer

Implementation Specifics

These subroutines are part of the Base Operating System (BOS) Runtime.

Related Information

The pthdebug.h file.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]