[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, 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.

Each list is reset to the top of the list when the pthdb_session_update function is called, or when the list function reports a PTHDB_INVALID_* value. For example, when pthdb_attr reports an attribute of PTHDB_INVALID_ATTR the list is reset to the beginning such that the next call reports the first attribute in the list, if any.

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.

When PTHDB_LIST_FIRST is passed for the cmd parameter, the first item in the list is retrieved.

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.

The pthread.h file.


[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]