Query the various fields of a pthread attribute and return the results in the specified buffer.
pthread debug library (libpthdebug.a)
#include <sys/pthdebug.h> int pthdb_attr_detachstate (pthdb_session_t session, pthdb_attr_t attr, pthdb_detachstate_t *detachstatep); int pthdb_attr_inheritsched (pthdb_session_t session, pthdb_attr_t attr, pthdb_inheritsched_t *inheritschedp); int pthdb_attr_schedparam (pthdb_session_t session, pthdb_attr_t attr, struct sched_param *schedparamp); int pthdb_attr_schedpolicy (pthdb_session_t session, pthdb_attr_t attr, pthdb_policy_t *schedpolicyp) int pthdb_attr_schedpriority (pthdb_session_t session, pthdb_attr_t attr, int *schedpriorityp) int pthdb_attr_scope (pthdb_session_t session, pthdb_attr_t attr, pthdb_scope_t *scopep) int pthdb_attr_suspendstate (pthdb_session_t session, pthdb_attr_t attr, pthdb_suspendstate_t *suspendstatep)
Each pthread is created using either the default pthread attribute or a user-specified pthread attribute. These functions query the various fields of a pthread attribute and, if successful, return the result in the buffer specified. In all cases, the values returned reflect the expected fields of a pthread created with the attribute specified.
pthdb_attr_detachstate reports if the created pthread is detachable (PDS_DETACHED) or joinable (PDS_JOINABLE). PDS_NOTSUP is reserved for unexpected results.
pthdb_attr_inheritsched reports whether the created pthread will run with scheduling policy and scheduling parameters from the created pthread (PIS_INHERIT), or from the attribute (PIS_EXPLICIT). PIS_NOTSUP is reserved for unexpected results.
pthdb_attr_schedparam reports the scheduling parameters associated with the pthread attribute. See pthdb_attr_inheritsched for additional information.
pthdb_attr_schedpolicy reports whether the scheduling policy associated with the pthread attribute is other (SP_OTHER), first in first out (SP_FIFO), or round robin (SP_RR). SP_NOTSUP is reserved for unexpected results.
pthdb_attr_schedpriority reports the scheduling priority associated with the pthread attribute. See pthdb_attr_inheritsched for additional information.
pthdb_attr_scope reports whether the created pthread will have process scope (PS_PROCESS) or system scope (PS_SYSTEM). PS_NOTSUP is reserved for unexpected results.
pthdb_attr_suspendstate reports whether the created pthread will be suspended (PSS_SUSPENDED) or not (PSS_UNSUSPENDED). PSS_NOTSUP is reserved for unexpected results.
If successful these functions return PTHDB_SUCCESS. Otherwise, and error code is returned.
PTHDB_BAD_SESSION | Invalid session handle. |
PTHDB_BAD_ATTR | Invalid attribute handle. |
PTHDB_BAD_POINTER | Invalid buffer pointer. |
PTHDB_CALLBACK | Debugger call back error. |
PTHDB_NOTSUP | Not supported. |
PTHDB_INTERNAL | Internal library error. |
These subroutines are part of the Base Operating System (BOS) Runtime.
The pthdebug.h file.