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

pthdb_rwlock_owner, pthdb_rwlock_pshared or pthdb_rwlock_state Subroutine

Purpose

Gets the owner, the pshared value, or the state of the read/write lock.

Library

pthread debug library (libpthdebug.a)

Syntax

#include <sys/pthdebug.h>

int pthdb_rwlock_owner (pthdb_session_t session,
                        pthdb_rwlock_t  rwlock,
                        pthdb_pthread_t *ownerp)
int pthdb_rwlock_pshared (pthdb_session_t session,
                          pthdb_rwlock_t  rwlock,
                          pthdb_pshared_t *psharedp)
int pthdb_rwlock_state (pthdb_session_t      session,
                        pthdb_rwlock_t       rwlock,
                        pthdb_rwlock_state_t *statep)

Description

The pthdb_rwlock_owner is used to get the read/write lock owner's pthread handle.

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

The pthdb_rwlock_state is used to get the read/write lock's state. The state can be RWLS_NOTSUP, RWLS_WRITE, RWLS_FREE, and RWLS_READ.

Parameters

session Session handle.
rwlock Read write lock handle
ownerp Pointer to pthread which owns the rwlock
psharedp Pointer to pshared value
statep Pointer to state value

Return Values

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

Error Codes

PTHDB_BAD_SESSION Invalid session handle.
PTHDB_CALLBACK Debugger call back error.
PTHDB_INTERNAL Error in library.
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 ]