pthdb_pthread_tid or pthdb_tid_pthread Subroutine

Purpose

Gets the kernel thread associated with the pthread and the pthread associated with the kernel thread.

Library

pthread debug library (libpthdebug.a)

Syntax

#include <sys/pthdebug.h>

int pthdb_pthread_tid (pthdb_session_t  session,
                       pthdb_pthread_t  pthread,
                       tid_t           * tidp)
int pthdb_tid_pthread (pthdb_session_t  session,
                       tid_t            tid,
                       pthdb_pthread_t * pthreadp)

Description

pthdb_pthread_tid gets the kernel thread id associated with the pthread.

pthdb_tid_pthread is used to get the pthread associated with the kernel thread.

Parameters

Item Description
session Session handle.
pthread Pthread handle
pthreadp Pointer to pthread handle
tid Kernel thread id
tidp Pointer to kernel thread id

Return Values

If successful, these functions return PTHDB_SUCCESS. Otherwise, an error code is returned.

Error Codes

Item Description
PTHDB_BAD_PTHREAD Invalid pthread handle.
PTHDB_BAD_SESSION Invalid session handle.
PTHDB_BAD_TID Invalid tid.
PTHDB_CALLBACK Debugger call back error.
PTHDB_INTERNAL Error in library.
PTHDB_INVALID_TID Empty list or the end of a list.