[ Bottom of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions, Volume 2

rs_getinfo Subroutine

Purpose

Gets information about a resource set.

Library

Standard C library (libc.a)

Syntax

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

Description

The rs_getinfo subroutine retrieves information about the resource set identified by the rset parameter. Depending on the value of the info_type parameter, the rs_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

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. Specify as 0.

Return Values

If successful, the requested information is returned. If unsuccessful, a value of -1 is returned and the errno global variable is set to indicate the error.

Error Codes

The rs_getinfo subroutine is unsuccessful if one or more of the following are true:

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.

Related Information

The rs_numrads Subroutine.

[ Top of Page | Previous Page | Next Page | Contents | Index | Library Home | Legal | Search ]