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

NAME

6       lgrp_home - get home lgroup
7

SYNOPSIS

9       cc [ flag... ] file... -llgrp [ library... ]
10       #include <sys/lgrp_user.h>
11
12       lgrp_id_t lgrp_home(idtype_t idtype, id_t id);
13
14

DESCRIPTION

16       The  lgrp_home()  function  returns  the  ID of the home lgroup for the
17       given process or thread.  A thread can have an affinity for  an  lgroup
18       in  the system such that the thread will tend to be scheduled to run on
19       that lgroup and allocate memory  from  there  whenever  possible.   The
20       lgroup  with the strongest affinity that the thread can run on is known
21       as the "home lgroup" of the thread.  If the thread has no affinity  for
22       any  lgroup that it can run on, the operating system will choose a home
23       for it.
24
25
26       The idtype argument should be P_PID to specify a  process  and  the  id
27       argument  should  be  its  process  ID.  Otherwise, the idtype argument
28       should be P_LWPID to specify a thread and the id argument should be its
29       LWP ID. The value P_MYID can be used for the id argument to specify the
30       current process or thread.
31

RETURN VALUES

33       Upon successful completion, lgrp_home() returns  the  ID  of  the  home
34       lgroup  of  the  specified process or thread. Otherwise, −1 is returned
35       and errno is set to indicate the error.
36

ERRORS

38       The lgrp_home() function will fail if:
39
40       EINVAL    The ID type is not valid.
41
42
43       EPERM     The effective user of  the  calling  process  does  not  have
44                 appropriate  privileges,  and  its  real or effective user ID
45                 does not match the real or effective user ID of  one  of  the
46                 threads.
47
48
49       ESRCH     The specified process or thread was not found.
50
51

ATTRIBUTES

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

SEE ALSO

67       lgrp_affinity_get(3LGRP), lgrp_init(3LGRP), attributes(5)
68
69
70
71SunOS 5.11                        1 Jun 2003                  lgrp_home(3LGRP)
Impressum