Gets the owner, the pshared value, or the state of the read/write lock.
pthread debug library (libpthdebug.a)
int pthdb_rwlock_addr (pthdb_session_t session,
pthdb_addr_t * addrp)
int pthdb_rwlock_lock_count (pthdb_session_t session,
int * countp);
int pthdb_rwlock_owner (pthdb_session_t session,
pthdb_pthread_t * ownerp
int pthdb_rwlock_pshared (pthdb_session_t session,
pthdb_pshared_t * psharedp)
int pthdb_rwlock_state (pthdb_session_t session,
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.
|addrp||Read write lock address.|
|countp||Read write lock lock count.|
|cmd||cmd can be PTHDB_LIST_FIRST to get the first owner in the list of owners or PTHDB_LIST_NEXT to get the next owner in the list of owners. The list is empty or ended by *owner == PTHDB_INVALID_PTHREAD.|
|ownerp||Pointer to pthread which owns the rwlock|
|psharedp||Pointer to pshared value|
|rwlock||Read write lock handle|
|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_BAD_CMD||Invalid command passed.|
|PTHDB_CALLBACK||Debugger call back error.|
|PTHDB_INTERNAL||Error in library.|
These subroutines are part of the Base Operating System (BOS) Runtime.
The pthdebug.h file.
The pthread.h file.