Using lgrp_cookie_stale
()
The lgrp_cookie_stale
()
function determines whether the
snapshot of the lgroup hierarchy represented by the given cookie is current.
#include <sys/lgrp_user.h> int lgrp_cookie_stale(lgrp_cookie_t cookie);
The cookie returned by the lgrp_init
()
function can become
stale depending on the view that the snapshot represents. A cookie returned by the
lgrp_init
()
function with the view set to
LGRP_VIEW_OS
can become stale due to changes in the lgroup
hierarchy such as dynamic reconfiguration or a change in a CPU's online status. A
cookie returned by the lgrp_init
()
function with the view set to
LGRP_VIEW_CALLER
can become stale due to changes in the
calling thread's processor set or changes in the lgroup hierarchy. A stale cookie is
refreshed by calling the lgrp_fini
()
function with the old
cookie, followed by calling lgrp_init
()
to generate a new
cookie.
The lgrp_cookie_stale
()
function returns
EINVAL
when the given cookie is invalid. For more
information, see the
lgrp_cookie_stale
(3LGRP) man page.