readwritelock subcommand for dbx: Display a list of active read/write lock objects

Format

Description

The readwritelock subcommand displays a list of active read/write lock objects for the application program. All active read/write lock objects are listed unless you use the number parameter to specify the read/write lock objects you want listed. You can also select only locked or unlocked read/write locks, or read/write locks with or without holders, by using the lock, unlock, holder, or noholder options.

In order to capture the read/write lock variables, dbx must be debugging your program before the read/write lock variable is created. You must have coded your application in one of the following ways:
  • Add the following line at the top of the C program:
    #pragma runopts(TEST(ALL))

    Or:

  • Start of changeCode an assembler program, CEEUOPT, to invoke the CEEXOPT macro, which specifies TEST(ALL). For examples of how to code this program, see z/OS Language Environment Programming Guide.

    Or:

    End of change
  • Specify test(all) in the _CEE_RUNOPTS environment variable:
    export _CEE_RUNOPTS="test(all)"

Usage notes

The readwritelock subcommand can be run only while the dbx debug program is running.

Examples

  1. To display all read/write lock objects, enter:
    readwritelock
  2. To display read/write lock objects number 1 and number 4, enter:
    readwritelock 1 4
  3. To display all locked read/write lock objects, enter:
    readwritelock lock
  4. To display all unlocked read/write lock objects, enter:
    readwritelock unlock
  5. To display all read/write lock objects with holders, enter:
    readwritelock holder
  6. To display all read/write lock objects without holders, enter:
    mutex noholders