Using lgrp_home()

The lgrp_home() function returns the home lgroup for the specified process or thread.

#include <sys/lgrp_user.h>
lgrp_id_t lgrp_home(idtype_t idtype, id_t id);

The lgrp_home() function returns EINVAL when the ID type is not valid. The lgrp_home() function returns EPERM when the user of the calling process is not the superuser and the user ID of the calling process does not match the user ID of one of the threads. The lgrp_home() function returns ESRCH when the specified process or thread is not found.