mutex subcommand for dbx: Display a list of active mutex objects

Format

Description

The mutex subcommand displays a list of active mutex objects for the application program. All active mutex objects are listed unless you use the number parameter to specify the mutex objects you want listed. You can also select only locked or unlocked mutexes, or mutexes with or without waiters, by using the lock, unlock, wait, or nowait options.

In order to capture the mutex variables, dbx must be debugging your program before the mutex 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.End of change

Usage notes

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

Examples

  1. To display all mutex objects, enter:
    mutex
  2. To display mutex objects number 1 and number 4, enter:
    mutex 1 4
  3. To display all locked mutex objects, enter:
    mutex lock
  4. To display all unlocked mutex objects, enter:
    mutex unlock
  5. To display all mutex objects with waiters, enter:
    mutex wait
  6. To display all mutex objects without waiters, enter:
    mutex nowait