dg_pthread_group_self(3T) DG/UX 5.4R3.00 dg_pthread_group_self(3T)
NAME
dgpthreadgroupself - get calling thread's group ID
SYNOPSIS
#include <pthread.h>
dgpthreadgroupt dgpthreadgroupself(void);
DESCRIPTION
The dgpthreadgroupself() function returns the thread group ID of
the calling thread in a way similar to which pthreadself() returns
the thread ID of the calling thread.
DIAGNOSTICS
Returns
See DESCRIPTION.
SEE ALSO
dgpthreadgroupcreate(3T), dgpthreadgroupdestroy(3T),
dgpthreadgroupequal(3T), dgpthreadgroupgetlwpgroupid(3T).
NOTES
The only operations allowed on thread group IDs are assignment and
comparison using dgpthreadgroupequal(). An application cannot
assume that a thread group ID is implemented as a scalar value such
as an unsigned int. In the future, DG/UX may implement these as
structures. For this reason, it is incorrect to assume that thread
group IDs can be treated as integers and passed, for example, to
printf() for display. However, the corresponding LWP group ID for a
thread group ID is a scalar and can be obtained with a call to
dgpthreadgroupgetlwpgroupid(3T).
In the current DG/UX implementation, the thread group ID is the same
as the corresponding LWP group ID, and thread group IDs start at 0
and count up in a process. Hence thread group IDs are not global
across processes, but rather local to a process. However, an
application should not take advantage of this knowledge and assume
that thread group IDs can be used like integers in places such as
array indexes.
Moreover, because thread group IDs can get reused within the same
process, an application must not assume that thread group IDs will be
unique for the entire life of a process. In fact, an application
needs to take great care not to use a thread group ID of a destroyed
thread group.
Licensed material--property of copyright holder(s) 1