编程接口指南

使用 lgrp_home()

lgrp_home() 函数返回指定进程或线程的主 lgroup。

#include <sys/lgrp_user.h>

lgrp_id_t lgrp_home(idtype_t idtype, id_t id);

如果 ID 类型无效,则 lgrp_home() 函数将返回 EINVAL。如果调用进程的有效用户不是超级用户,并且调用进程的实际用户 ID 或有效用户 ID 与某个线程的实际用户 ID 或有效用户 ID 不匹配,则 lgrp_home() 函数将返回 EPERM。如果未找到指定的进程或线程,则 lgrp_home() 函数将返回 ESRCH