pthread_getlwpid_np.3t (2010 09)

p
pthread_getlwpid_np(3T) pthread_getlwpid_np(3T)
(Pthread Library)
NAME
pthread_getlwpid_np() - get the Light Weight Process ID of a thread
SYNOPSIS
#include <pthread.h>
#include <sys/types.h>
int pthread_getlwpid_np(
pthread_t thread,
lwpid_t *lwpid
);
PARAMETERS
thread Thread whose Light Weight Process ID is required.
lwpid Pointer to the location where the Light Weight Process ID of the thread is to be returned.
DESCRIPTION
Each PTHREAD_SCOPE_SYSTEM
thread is associated with a unique system wide Light Weight Process
ID (LWPID).
pthread_getlwpid_np()
stores the LWPID of the target thread in lwpid .
NOTE:
The pthread_getlwpid_np()
function is applicable only for PTHREAD_SCOPE_SYSTEM
threads.
RETURN VALUE
Upon successful completion, pthread_getlwpid_np()
returns zero. Otherwise, an error number is
returned to indicate the error (the errno variable is not set).
ERRORS
If any of the following problems occur, the
pthread_getlwpid_np()
function returns the correspond-
ing error number:
[EINVAL] The value specified by thread does not refer to a
PTHREAD_SCOPE_SYSTEM thread, or
the value lwpid points to is an illegal address.
[ESRCH] No thread could be found corresponding to thread .
AUTHOR
pthread_getlwpid_np()
was developed by HP.
SEE ALSO
pthread_attr_init(3T), pthread_create(3T).
HP-UX 11i Version 3: September 2010 1 Hewlett-Packard Company 1

Summary of content (2 pages)