Locality Group Library Functions lgrpresources(3LGRP)
NAME
lgrpresources - get lgroup resources of given lgroup
SYNOPSIS
cc [ flag ... ] file... -llgrp [ library ... ]
#include
int lgrpresources(lgrpcookiet cookie, lgrpidt lgrp,
lgrpidt *lgrpids, uintt count, lgrprsrct type);
DESCRIPTION
The lgrpresources() function takes a cookie representing
a snapshot of the lgroup hierarchy obtained from
lgrpinit(3LGRP) and returns the number of resources in the
lgroup specified by lgrp. The resources are represented by
a set of lgroups in which each lgroup directly contains CPU
and/or memory resources.
The type argument should be set to one of the following
values to specify whether the CPU or memory resources should
be returned:
LGRPRSRCPU /* CPU resources */
LGRPRSRCMEM /* Memory resources */
If the lgrpids[] argument is non-null and the count argument
is non-zero, lgrpresources() stores up to the specified
count of lgroup IDs into the lgrpids[] array.
RETURN VALUES
Upon successful completion, lgrpresources() returns the
number of lgroup resources. Otherwise, -1 is returned and
errno is set to indicate the error.
ERORS
The lgrpresources() function will fail if:
EINVAL The specified cookie, lgroup ID, or type is not
valid.
ESRCH The specified lgroup ID was not found.
ATRIBUTES
See attributes(5) for descriptions of the following attri-
butes:
SunOS 5.11 Last change: 26 Jan 2005 1
Locality Group Library Functions lgrpresources(3LGRP)
ATRIBUTE TYPE ATRIBUTE VALUE
Interface Stability Evolving
MT-Level MT-Safe
SEE ALSO
lgrpchildren(3LGRP), lgrpinit(3LGRP), lgrpparents(3LGRP),
liblgrp(3LIB), attributes(5)
SunOS 5.11 Last change: 26 Jan 2005 2
|