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_addr (pthdb_session_t session,
pthdb_rwlock_t rwlock,
pthdb_addr_t * addrp)
int pthdb_rwlock_lock_count (pthdb_session_t session,
pthdb_rwlock_t rwlock,
int * countp);
int pthdb_rwlock_owner (pthdb_session_t session,
pthdb_rwlock_t rwlock,
pthdb_pthread_t * ownerp
int cmd)
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_addr function reports the address of the pthdb_rwlock_t.
The pthdb_rwlock_lock_count function reports the lock count for the rwlock.
The pthdb_rwlock_owner function 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 locks state. The state can be RWLS_NOTSUP, RWLS_WRITE, RWLS_FREE, and RWLS_READ.
If successful, these functions return PTHDB_SUCCESS. Otherwise, an error code is returned.
PTHDB_BAD_SESSION | Invalid session handle. |
PTHDB_BAD_CMD | Invalid command passed. |
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.
The pthread.h file.