krs_getinfo Subroutine

Purpose

Gets information about a resource set.

Syntax

#include <sys/rset.h>
int krs_getinfo(rset, info_type, flags, result)
rsethandle_t rset;
rsinfo_t info_type;
unsigned int flags;
int *result;

Description

The krs_getinfo subroutine retrieves information about the resource set identified by the rset parameter. Depending on the value of the info_type parameter, the krs_getinfo subroutine returns information about the number of available processors, the number of available memory pools, or the amount of available memory contained in the resource rset.

The subroutine can also return global system information such as the maximum system detail level, the symmetric multiprocessor (SMP) and multiple chip module (MCM) system detail levels, and the maximum number of processor or memory pool resources in a resource set.

Parameters

Item Description
rset Specifies a resource set handle of a resource set the information should be retrieved from. This parameter is not meaningful if the info_type parameter is R_MAXSDL, R_MAXPROCS, R_MAXMEMPS, R_SMPSDL, or R_MCMSDL.
info_type Specifies the type of information being requested. One of the following values (defined in rset.h) can be used:
  • R_NUMPROCS: The number of available processors in the resource set is returned.
  • R_NUMMEMPS: The number of available memory pools in the resource set is returned.
  • R_MEMSIZE: The amount of available memory (in MB) contained in the resource set is returned.
  • R_MAXSDL: The maximum system detail level of the system is returned.
  • R_MAXPROCS: The maximum number of processors that may be contained in a resource set is returned.
  • R_MAXMEMPS: The maximum number of memory pools that may be contained in a resource set is returned.
  • R_SMPSDL: The system detail level that corresponds to the traditional notion of an SMP is returned. A system detail level of 0 is returned if the hardware system does not provide system topology data.
  • R_MCMSDL: The system detail level that corresponds to resources packaged in an MCM is returned. A system detail level of 0 is returned if the hardware system does not have MCMs or does not provide system topology data.
flags Reserved for future use. Must be specified as 0.
result Points to an integer where the result is stored on successful completion.

Return Values

Upon successful completion, the krs_getinfo subroutine returns a 0, and the result field contains the requested information. If unsuccessful, one or more of the following are returned:
Item Description
EINVAL One of the following is true:
  • The info_type parameter specifies an invalid resource type value.
  • The flags parameter was not specified as 0.
EFAULT Invalid address.