1lgrp_cpus(3LGRP) Locality Group Library Functions lgrp_cpus(3LGRP)
2
3
4
6 lgrp_cpus - get CPU IDs contained in specified lgroup
7
9 cc [ flag... ] file... -llgrp [ library... ]
10 #include <sys/lgrp_user.h>
11
12 int lgrp_cpus(lgrp_cookie_t cookie, lgrp_id_t lgrp,
13 processorid_t *cpuids, uint_t count, int content);
14
15
17 The lgrp_cpus() function takes a cookie representing a snapshot of the
18 lgroup hierarchy obtained from lgrp_init(3LGRP) and returns the number
19 of CPUs in the lgroup specified by lgrp. If both the cpuids[] argument
20 is non-null and the count is non-zero, lgrp_cpus() stores up to the
21 specified count of CPU IDs into the cpuids[] array.
22
23
24 The content argument should be set to one of the following values to
25 specify whether the direct contents or everything in this lgroup should
26 be returned:
27
28 LGRP_CONTENT_ALL /* everything in this lgroup */
29 LGRP_CONTENT_DIRECT /* directly contained in lgroup */
30 LGRP_CONTENT_HIERARCHY /* everything within this hierarchy (for
31 compatibility only, use LGRP_CONTENT_ALL) */
32
33
34
35 The LGRP_CONTENT_HIERARCHY value can still be used, but is being
36 replaced by LGRP_CONTENT_ALL.
37
39 Upon successful completion, the number of CPUs in the given lgroup is
40 returned. Otherwise, −1 is returned and errno is set to indicate the
41 error.
42
44 The lgrp_cpus() function will fail if:
45
46 EINVAL The specified cookie, lgroup ID, or one of the flags is not
47 valid.
48
49
50 ESRCH The specified lgroup ID was not found.
51
52
54 See attributes(5) for descriptions of the following attributes:
55
56
57
58
59 ┌─────────────────────────────┬─────────────────────────────┐
60 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
61 ├─────────────────────────────┼─────────────────────────────┤
62 │Interface Stability │Evolving │
63 ├─────────────────────────────┼─────────────────────────────┤
64 │MT-Level │MT-Safe │
65 └─────────────────────────────┴─────────────────────────────┘
66
68 lgrp_init(3LGRP), lgrp_mem_size(3LGRP), lgrp_resources(3LGRP),
69 liblgrp(3LIB), attributes(5)
70
71
72
73SunOS 5.11 26 Jan 2005 lgrp_cpus(3LGRP)