Reports and changes the hold state of the specified pthread.
Library
pthread debug library (libpthdebug.a)
pthdb_pthread_holdstate reports if a pthread is held. The possible hold states are PHS_HELD, PHS_NOTHELD, or PHS_NOTSUP.
pthdb_pthread_hold prevents the specified pthread from running.
pthdb_pthread_unhold unholds the specified pthread. The pthread held earlier can be unheld by calling this function.
Item | Description |
---|---|
session | Session handle. |
pthread | pthread handle. The specified pthread should have an attached kernel thread id. |
holdstatep | Pointer to the hold state |
If successful, pthdb_pthread_hold returns PTHDB_SUCCESS. Otherwise, it returns an error code.
Item | Description |
---|---|
PTHDB_BAD_PTHREAD | Invalid pthread handle. |
PTHDB_BAD_SESSION | Invalid session handle. |
PTHDB_HELD | pthread is held. |
PTHDB_INTERNAL | Error in library. |