dg_pthread_get_lwpid(3T) DG/UX R4.11MU05 dg_pthread_get_lwpid(3T)
NAME
dgpthreadgetlwpid - translate a thread ID to an LWPID
SYNOPSIS
#include <pthread.h>
#include <sys/types.h>
lwpidt dgpthreadgetlwpid(pthreadt thread);
where:
thread Thread ID to be translated
DESCRIPTION
This function returns the kernel-level LWPID corresponding to the
thread ID given by thread.
In DG/UX, every thread has a corresponding (efficient) kernel-level
LWP. Hence it is possible to retrieve, in a non-portable way, the
LWPID for a given thread ID. LWPIDs are reported by the nps(1)
command and by calls to dglwpinfo(2).
DIAGNOSTICS
Returns
The dgpthreadgetlwpid() function returns the corresponding LWPID.
SEE ALSO
dglwpinfo(2), nps(1), pthreadcreate(3T), pthreadself(3T).
NOTES
In the current DG/UX implementation, the thread ID is the same as the
corresponding LWPID. However, applications should not make any
assumptions about this relationship holding up in the future.
Refer to <sys/intd6pthread.h>, <sys/dglwp.h> and
pthreadself(3T) NOTES for a more detailed discussion on proper use
of thread IDs and LWP group IDs.
Licensed material--property of copyright holder(s)