Mutexes can be named to aid in application debug

The i5/OS threads support of mutexes allows the application to name mutexes. Named mutexes can be used to aid in problem determination. The performance and behavioral characteristics of named mutexes are identicle to normal mutexes.

When an application is using mutexes and has deadlocked, you may be able to determine which mutexes are being used by the application more easily if the mutexes being used are named.

You can use the DSPJOB CL command to help debug the application. From DSPJOB, choose option 19 - Display mutexes, if active or option 20 - Display threads, if active to view the mutexes and threads being used by the application.

See pthread_mutexattr_setname_np()--Set Name in Mutex Attributes Object and pthread_mutexattr_getname_np()--Get Name from Mutex Attributes Object if you would like to use named mutexes in your application.


Pthread APIs | APIs by category