1getcpuid(3C) Standard C Library Functions getcpuid(3C)
2
3
4
6 getcpuid, gethomelgroup - obtain information on scheduling decisions
7
9 #include <sys/processor.h>
10
11 processorid_t getcpuid(void);
12
13
14 ushort_t gethomelgroup(void);
15
16
18 The getcpuid() function returns the processor ID on which the calling
19 thread is currently executing.
20
21
22 The gethomelgroup() function returns the home locality group ID of the
23 calling thread.
24
26 See DESCRIPTION.
27
29 No errors are defined.
30
32 Both the current CPU and the home locality group can change at any
33 time.
34
36 See attributes(5) for descriptions of the following attributes:
37
38
39
40
41 ┌─────────────────────────────┬─────────────────────────────┐
42 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
43 ├─────────────────────────────┼─────────────────────────────┤
44 │Interface Stability │getcpuid() is Stable; geth‐ │
45 │ │omelgroup() is Obsolete. │
46 ├─────────────────────────────┼─────────────────────────────┤
47 │MT-Level │MT-Safe │
48 └─────────────────────────────┴─────────────────────────────┘
49
51 psradm(1M), psrinfo(1M), psrset(1M), p_online(2), processor_bind(2),
52 processor_info(2), pset_assign(2), pset_bind(2), pset_info(2), mem‐
53 info(2), lgrp_home(3LGRP), sysconf(3C), attributes(5)
54
56 The gethomelgroup() function is obsolete and might be removed in a
57 future release. It has been replaced by lgrp_home(3LGRP).
58
59
60
61SunOS 5.11 16 Apr 2003 getcpuid(3C)