'\" te .\" Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. .TH lgrp_affinity_inherit_get 3LGRP "2 June 2011" "SunOS 5.11" "Locality Group Library Functions" .SH NAME lgrp_affinity_inherit_get \- get lgroup affinity inheritance .SH SYNOPSIS .LP .nf cc [ \fIflag \&.\|.\|.\fR ] \fIfile\fR\&.\|.\|. \fB-llgrp\fR [ \fIlibrary \&.\|.\|.\fR ] #include lgrp_aff_inherit_t lgrp_affinity_inherit_get(idtype_t \fIidtype\fR, id_t \fIid\fR); .fi .SH DESCRIPTION .sp .LP The \fBlgrp_affinity_inherit_get()\fR function returns the lgroup affinity inheritance of the specified process or thread. The lgroup affinities can be inherited by child processes or threads across \fBfork\fR(2), \fBexec\fR(2), \fBpthread_create\fR(3C), and \fBthr_create\fR(3C). By default, they are not inherited across \fBfork()\fR, \fBpthread_create()\fR, and \fBthr_create()\fR, but are inherited across the \fBexec\fR functions for compatibility. .sp .LP If the \fIidtype\fR is \fBP_PID\fR, the lgroup affinity inheritance is retrieved for one of the threads in the process with process ID (PID) \fIid\fR. The lgroup affinity inheritance is gotten for the thread in the current process with LWP ID \fIid\fR if \fIidtype\fR is \fBP_LWPID\fR. If \fIid\fR is \fBP_MYID\fR, then the current thread or process is specified. .sp .LP The \fBlgrp_aff_inherit_t\fR can be one of the following values: .sp .ne 2 .mk .na \fB\fBLGRP_AFF_INHERIT_DEFAULT\fR\fR .ad .RS 28n .rt The lgroup affinity inheritance is set to the default value for the specified process or thread. .RE .sp .ne 2 .mk .na \fB\fBLGRP_AFF_INHERIT_NONE\fR\fR .ad .RS 28n .rt The lgroup affinities are not inherited from the specified process or thread. .RE .sp .ne 2 .mk .na \fB\fBLGRP_AFF_INHERIT_FUTURE\fR\fR .ad .RS 28n .rt The lgroup affinities will be inherited by future children of the specified process or thread. .RE .SH RETURN VALUES .sp .LP Upon successful completion, \fBlgrp_affinity_inherit_get()\fR returns one of the values described above for \fBlgrp_aff_inherit_t\fR. Otherwise, -1 is returned and \fIerrno\fR is set to indicate the error. .SH ERRORS .sp .LP The \fBlgrp_affinity_inherit_set()\fR function will fail if: .sp .ne 2 .mk .na \fB\fBEACCES\fR\fR .ad .RS 10n .rt Operation permission is denied to the calling process (see \fBIntro\fR(2)). .RE .sp .ne 2 .mk .na \fB\fBEINVAL\fR\fR .ad .RS 10n .rt An invalid \fIidtype\fR or ID was given. .RE .SH ATTRIBUTES .sp .LP See \fBattributes\fR(5) for descriptions of the following attributes: .sp .sp .TS tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) . ATTRIBUTE TYPEATTRIBUTE VALUE _ Interface StabilityCommitted _ MT-LevelMT-Safe .TE .SH SEE ALSO .sp .LP \fBIntro\fR(2), \fBexec\fR(2), \fBfork\fR(2), \fBlgrp_affinity_get\fR(3LGRP), \fBlgrp_affinity_inherit_set\fR(3LGRP), \fBlgrp_affinity_set\fR(3LGRP), \fBliblgrp\fR(3LIB), \fBpthread_create\fR(3C), \fBthr_create\fR(3C), \fBattributes\fR(5)