Gets the owner, the pshared value, or the state of the read/write lock.
pthread debug library (libpthdebug.a)
#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)
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.
| 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 |
If successful, these functions return PTHDB_SUCCESS. Otherwise, an error code is returned.
| PTHDB_BAD_SESSION | Invalid session handle. |
| PTHDB_CALLBACK | Debugger call back error. |
| PTHDB_INTERNAL | Error in library. |
| PTHDB_POINTER | Invalid pointer |
These subroutines are part of the Base Operating System (BOS) Runtime.
The pthdebug.h file.