1lgrp_resources(3LGRP)  Locality Group Library Functions  lgrp_resources(3LGRP)
2
3
4

NAME

6       lgrp_resources - get lgroup resources of given lgroup
7

SYNOPSIS

9       cc [ flag ... ] file... -llgrp [ library ... ]
10       #include <sys/lgrp_user.h>
11
12       int lgrp_resources(lgrp_cookie_t cookie, lgrp_id_t lgrp,
13            lgrp_id_t *lgrpids, uint_t count, lgrp_rsrc_t type);
14
15

DESCRIPTION

17       The lgrp_resources() function takes a  cookie  representing  a snapshot
18       of the lgroup hierarchy obtained from lgrp_init(3LGRP) and returns  the
19       number of resources in the lgroup specified by lgrp.  The resources are
20       represented by a set of lgroups in which each lgroup directly  contains
21       CPU and/or memory resources.
22
23
24       The type argument should be set to one of the following values to spec‐
25       ify whether the CPU or memory resources should be returned:
26
27         LGRP_RSRC_CPU      /* CPU resources */
28         LGRP_RSRC_MEM      /* Memory resources */
29
30
31
32       If the lgrpids[] argument is non-null and the count  argument  is  non-
33       zero,  lgrp_resources()  stores up to the specified count of lgroup IDs
34       into the lgrpids[] array.
35

RETURN VALUES

37       Upon  successful  completion,  lgrp_resources() returns the number   of
38       lgroup  resources.  Otherwise, -1 is returned and errno is set to indi‐
39       cate the error.
40

ERRORS

42       The lgrp_resources() function will fail if:
43
44       EINVAL    The specified cookie, lgroup  ID, or type is not valid.
45
46
47       ESRCH     The specified lgroup ID was not found.
48
49

ATTRIBUTES

51       See attributes(5) for descriptions of the following attributes:
52
53
54
55
56       ┌─────────────────────────────┬─────────────────────────────┐
57       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
58       ├─────────────────────────────┼─────────────────────────────┤
59       │Interface Stability          │Evolving                     │
60       ├─────────────────────────────┼─────────────────────────────┤
61       │MT-Level                     │MT-Safe                      │
62       └─────────────────────────────┴─────────────────────────────┘
63

SEE ALSO

65       lgrp_children(3LGRP),      lgrp_init(3LGRP),       lgrp_parents(3LGRP),
66       liblgrp(3LIB), attributes(5)
67
68
69
70SunOS 5.11                        26 Jan 2005            lgrp_resources(3LGRP)
Impressum