Query: nloc
OS: osf1
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
nloc(3) Library Functions Manual nloc(3)NAMEnloc - Queries the NUMA Topology or Resource Affinity Domains (libnuma library)SYNOPSIS#include <numa.h> int nloc( numa_attr_t *numa_attr, radset_t radset );PARAMETERSPoints to a structure that specifies the criteria for selecting a set of resource Affinity Domains (RADs). This structure contains the fol- lowing elements: The type of resource for which the set of "nearby" RADs is requested. The resource descriptor for which the RAD set is requested. The distance criteria for selecting resources. RADs in the caller's partition that have a distance <= this value will be included in the radset returned by nloc(). See DESCRIPTION for more information about nattr_distance. Flags that influence the selection of RADs. See DESCRIPTION for details. Specifies a buffer to contain the set of RADs in the caller's partition that satisfy the criteria specified by numa_attr.DESCRIPTIONThe nloc() function will return in radset the set of RADs that have a distance <= the nattr_distance value from the specified resource. The returned radset value may be used as an argument to explicit process or thread placement APIs or in the mattr_radset member of a memory allocation policy structure for explicit memory placement. For simple NUMA topologies that have only two distances -- local and remote -- the following symbolic values for nattr_distance are defined: Represents the distance value for resources that are directly connected to the specified resource. Represents the maximum dis- tance value for the system. Generally, all RADs in the partition will be <= this distance. The following symbolic values are defined for the nattr_flags field: When specified, only RADs that have processes bound to them will be returned in radset. When specified, only RADs that do not have processes bound to them will be returned in radset.RETURN VALUESSuccess. Failure. In this case, errno is set to indicate the error.ERRORSIf the nloc() function fails, it sets errno to one of the following values for the reason specified: The numa_attr argument (or its nattr_descr field) or the radset argument point to an invalid address. One or more of the following conditions are true: The numa_attr argument contains an undefined type value. The nattr_descr field contains an invalid resource value for the specified type. The nattr_distance or nattr_flags fields contain an invalid or undefined value. The process specified by rd_pid does not exist. There are too many symbolic links in rd_pathname. The rd_pathname length exceeds MAXPATHLEN, or a component of rd_pathname exceeds MAXNAMELEN. The file named by rd_pathname does not exist. A component of rd_pathname is not a directory.SEE ALSOFunctions: rad_get_info(3) Files: numa_types(4) nloc(3)