Using lgrp_children
()
The lgrp_children
()
function takes a cookie that represents the
calling thread's snapshot of the lgroup hierarchy and returns the number of child
lgroups for the specified lgroup.
#include <sys/lgrp_user.h> int lgrp_children(lgrp_cookie_t cookie, lgrp_id_t parent, lgrp_id_t *lgrp_array, uint_t lgrp_array_size);
If lgrp_array
is not NULL
and the value of
lgrp_array_size
is not zero, the
lgrp_children
()
function fills the array with child lgroup
IDs until the array is full or all child lgroup IDs are in the array.
The lgrp_children
()
function returns
EINVAL
when the cookie is invalid. The
lgrp_children
()
function returns ESRCH
when the specified lgroup ID is not found. For more information, see the
lgrp_children
(3LGRP) man page.