pthdb_pthread_arg サブルーチン
目的
pthread に関連した情報を報告します。
ライブラリー
pthread デバッグ・ライブラリー (libpthdebug.a)
構文
int pthdb_pthread_arg (pthdb_session_t session,
pthdb_pthread_t pthread,
pthdb_addr_t * argp)
pthdb_pthread_t pthread,
pthdb_cancelstate_t * cancelstatep)
pthdb_pthread_t pthread,
pthdb_canceltype_t * canceltypep)
pthdb_pthread_t pthread,
pthdb_detachstate_t * detachstatep)
pthdb_pthread_t pthread,
struct sched_param * schedparamp);
pthdb_pthread_t pthread,
pthdb_schedpolicy_t * schedpolicyp)
pthdb_pthread_t pthread,
int * schedpriorityp)
pthdb_pthread_t pthread,
pthdb_suspendstate_t * suspendstatep)
説明
pthdb_pthread_arg は、pthread の開始関数に渡された初期引数を報告します。
pthdb_pthread_addr は、pthread_t のアドレスを報告します。
pthdb_pthread_cancelpend は、pthread で取り消しが保留されている場合はゼロ以外を報告し、そうでない場合はゼロを報告します。
pthdb_pthread_cancelstate は、取り消しが有効 (PCS_ENABLE) か無効 (PCS_DISABLE) かを報告します。 PCS_NOTSUP は、予期しない結果のために予約されています。
pthdb_pthread_canceltype は、取り消しが据え置き (PCT_DEFERRED) か非同期 (PCT_ASYNCHRONOUS) かを報告します。 PCT_NOTSUP は、予期しない結果のために予約されています。
pthdb_pthread_detachstate は、pthread が切り離された (PDS_DETACHED) か、結合可能な (PDS_JOINABLE) かを報告します。 PDS_NOTSUP は、予期しない結果のために予約されています。
pthdb_pthread_exit は、 pthread_exitを介して pthread によって戻される終了状況を報告します。 これは、pthread が終了した場合 (PST_TERM) にのみ有効です。
pthdb_pthread_func は、pthread の開始関数のアドレスを報告します。
pthdb_pthread_ptid は、pthread に関連した pthread ID (pthread_t) を報告します。
pthdb_pthread_schedparam は、pthread のスケジューリング・パラメーターを報告します。 これには現在、ポリシーと優先順位が含まれています。
pthdb_pthread_schedpolicy は、pthread のスケジューリング・ポリシーがその他 (SP_OTHER)、先入れ先出し (SP_FIFO)、またはラウンドロビン (SP_RR) のいずれであるかを報告します。 SP_NOTSUP は、予期しない結果のために予約されています。
pthdb_pthread_schedpriority は、pthread のスケジューリング優先順位を報告します。
pthdb_pthread_scope は、pthread がプロセス有効範囲 (PS_PROCESS) を持っているか、システム有効範囲 (PS_SYSTEM) を持っているかを報告します。 PS_NOTSUP は、予期しない結果のために予約されています。
pthdb_pthread_state は、pthread が作成されているかどうか (PST_IDLE)、現在実行されているかどうか (PST_RUN)、イベントを待機しているかどうか (PST_SLEEP)、CPU を待機しているかどうか (PST_READY)、結合または切り離しを待機しているか (PST_TERM) を報告します。 PST_NOTSUP は、予期しない結果のために予約されています。
pthdb_pthread_suspendstate は、pthread が中断されている (PSS_SUSPENDED) か、されていない (PSS_UNSUSPENDED) かを報告します。 PSS_NOTSUP は、予期しない結果のために予約されています。
pthdb_ptid_pthread は、ptid の pthread を報告します。
パラメーター
| 項目 | 説明 |
|---|---|
| addr | pthread アドレス |
| 引数 | 初期引数バッファー。 |
| 取り消し (cancelpendp) | 保留中のバッファーを取り消します。 |
| キャンセル状態 (cancelstatep) | 取り消し状態バッファー。 |
| キャンセル・タイプ | タイプ・バッファーを取り消します。 |
| 切り離し状態 (detachstatep) | 状態バッファーを切り離します。 |
| exitp (exitp) | 終了値バッファー。 |
| 関数 | 機能バッファーの開始。 |
| pthread | pthread ハンドル。 |
| pthreadp | pthread ハンドルへのポインター。 |
| ptid | pthread ID |
| ptidp (ptidp) | pthread ID バッファー。 |
| schedparamp | スケジューリング・パラメーター・バッファー。 |
| スケジュール・ポリシー | スケジューリング・ポリシー・バッファー。 |
| スケジューラー優先度 p | スケジューリング優先順位バッファー。 |
| スコープ | コンテンション有効範囲バッファー。 |
| セッション | セッション・ハンドル。 |
| 状態 (statep) | 状態バッファー。 |
| 中断状態 (suspendstatep) | 延期状態バッファー。 |
戻り値
正常に実行された場合、これらの関数は PTHDB_SUCCESSを返します。それ以外の場合は、エラー・コードが返されます。
エラー・コード
| 項目 | 説明 |
|---|---|
| PTHDB_BAD_SESSION | セッション・ハンドルが無効です。 |
| PTHDB_BAD_PTHREAD | pthread ハンドルが無効です。 |
| PTHDB_BAD_POINTER | バッファー・ポインターが無効です。 |
| PTHDB_BAD_PTID (PTHDB_BAD_PTID) | ptid が無効です。 |
| PTHDB_CALLBACK | デバッガー・コールバック・エラー。 |
| PTHDB_NOTSUP (PTHDB_NOTSUP) | サポートされていません。 |
| PTHDB_INTERNAL | ライブラリーにエラーがあります。 |