TotalView Online Help : Thread Objects Window : IBM AIX : R/W Locks Page

R/W Locks Page
A read-write lock is a mutual exclusion object that allows multiple threads to synchronize access to shared resources. A read-write lock has three states:
*
*
*
A free lock can be locked by any number of readers or by one writer. Once a read-write lock is locked by a thread for one kind of access, other threads attempting to lock it for other kinds of access will block. When locking threads unlock (release) the read-write lock, blocked threads can acquire (lock) it and proceed.
This page lists all read-write locks known in this process.
For each lock, TotalView displays the following information:
ID
This field contains the sequence number assigned to this read-write lock by the threads package. Diving into this field opens a window containing the read-write lock data.
State
This field displays the read-write lock state as follows:
Free
Unlocked.
Read
Locked for reading. By default, this is shown in blue; its color is the same as the thread’s stopped state flag color.
Write
Locked for writing. By default, this is shown in blue; its color is the same as the thread’s stopped state flag color.
Pshared
This value indicates if the read-write lock can be shared by other processes.
Private
The read-write lock can only be manipulated by the process that initialized it.
Shared
The read-write lock can be manipulated by any process that has access to its memory. (Some versions of IBM's system libraries cannot provide information on shared read-write locks to TotalView. If this information is not available, TotalView only describes private read-write locks.)
Owner
If the read-write lock is locked, this field displays the system TID of a locking thread. Diving or selecting on this number tells TotalView to display the Process Window for that thread. TotalView displays the same window if you dive or select the thread's entry in the Root Window’s Attached Page.
If threads are waiting for this read-write lock, their system TIDs are shown beneath the system TID in this field, with one thread ID being displayed for each line in the window. That is, threads that are waiting to read and threads waiting to write are grouped together.
You can open a Process Window for a waiting thread by diving or selecting its number.
If y cannot obtain this information, it does not show blocked thread lines.
Some versions of IBM’s system libraries cannot provide the correct owner TID for read-write locks locked for reading. In these cases, the owner TID can only be trusted when the lock is in its write state.
Address
The memory address of the read-write lock. You can open a window displaying the read-write lock data by diving on this field.

Rogue Wave Software, Inc.
Voice: (303) 473-9118
rwonlinedocs@roguewave.com