Go to main content

man pages section 3: Extended Library Functions, Volume 2

Exit Print View

Updated: Thursday, June 13, 2019
 
 

lgrp_affinity_inherit_get(3LGRP)

Name

lgrp_affinity_inherit_get - get lgroup affinity inheritance

Synopsis

cc [ flag … ] file–llgrp [ library … ]
#include <sys/lgrp_user.h>

lgrp_aff_inherit_t lgrp_affinity_inherit_get(idtype_t idtype,
     id_t id);

Description

The lgrp_affinity_inherit_get() function returns the lgroup affinity inheritance of the specified process or thread. The lgroup affinities can be inherited by child processes or threads across fork(2), exec(2), pthread_create(3C), and thr_create(3C). By default, they are not inherited across fork(), pthread_create (), and thr_create(), but are inherited across the exec functions for compatibility.

If the idtype is P_PID, the lgroup affinity inheritance is retrieved for one of the threads in the process with process ID (PID) id. The lgroup affinity inheritance is gotten for the thread in the current process with LWP ID id if idtype is P_LWPID. If id is P_MYID, then the current thread or process is specified.

The lgrp_aff_inherit_t can be one of the following values:

LGRP_AFF_INHERIT_DEFAULT

The lgroup affinity inheritance is set to the default value for the specified process or thread.

LGRP_AFF_INHERIT_NONE

The lgroup affinities are not inherited from the specified process or thread.

LGRP_AFF_INHERIT_FUTURE

The lgroup affinities will be inherited by future children of the specified process or thread.

Return Values

Upon successful completion, lgrp_affinity_inherit_get() returns one of the values described above for lgrp_aff_inherit_t. Otherwise, -1 is returned and errno is set to indicate the error.

Errors

The lgrp_affinity_inherit_set() function will fail if:

EACCES

Operation permission is denied to the calling process (see Intro(2)).

EINVAL

An invalid idtype or ID was given.

Attributes

See attributes(7) for descriptions of the following attributes:

ATTRIBUTE TYPE
ATTRIBUTE VALUE
Interface Stability
Committed
MT-Level
MT-Safe

See Also

Intro(2), exec(2), fork(2), pthread_create(3C), thr_create(3C), lgrp_affinity_get(3LGRP), lgrp_affinity_inherit_set(3LGRP), lgrp_affinity_set(3LGRP), liblgrp(3LIB), attributes(7)