Index Index for
Section 3
Index Alphabetical
listing for P
Bottom of page Bottom of
page

pthread_nsg_get(3)

NAME

pthread_nsg_get - Gets the list of threads in a NUMA Scheduling Group (libpthread library)

SYNOPSIS

#include <numa.h> int pthread_nsg_get( nsgid_t nsg, pthread_t *list, long size );

PARAMETERS

nsg Specifies the NUMA Scheduling Group (NSG) from which to retrieve the list of threads. list Specifies the address of the array of thread identifiers where the list of threads will be written. size Specifies the size (in number of thread identifiers) of the array where the list of threads will be written.

DESCRIPTION

The pthread_nsg_get() returns into the buffer pointed to by list an array of nsg_thread structures containing the process ids and thread indexes for all threads attached to the specified NSG. The list argument specifies the number of nsg_thread structures that the array must accommodate. To obtain the value for size, the application can first call pthread_nsg_get() with list set to null and read in the value of the nsg_nthread member in the nsgid_ds structure that the call returns. On the second call to pthread_nsg_get(), the application uses the nsg_nthread value for size and includes the appropriate value for list.

RESTRICTIONS

The effective user ID of the calling process must be equal to the value of nsg_perm.cuid or nsg_perm.uid in the associated nsgid_ds structure; or the calling process must have read permissions to the NSG.

RETURN VALUES

0 Success. Integer value Failure. In this case, the returned integer indicates the type of error. Possible errors are as follows: [EACCES] The calling process does not have read permission on the NSG. [EINVAL] The nsg argument does not specify a valid NSG identifier, or the nsg argument is not a valid address.

ERRORS

None.

SEE ALSO

Functions: nsg_attach_pid(3), nsg_get(3), numa_intro(3), pthread_nsg_attach(3) Files: numa_types(4)

Index Index for
Section 3
Index Alphabetical
listing for P
Top of page Top of
page