HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)

_
__pset_rtctl(2) __pset_rtctl(2)
with WRITE access to the pset can change the value of this attribute
to allow removal of the last processor from an RTE processor set even
if the processor set is busy. Refer to pset_setattr (2) for supported
values.
PSET_ATTR_NONEMPTY
Indicates the behavior on a request to destroy a non-empty processor
set. A non-empty processor set has at least one processor assigned to
it. For RTE processor sets, such a request will be rejected by default.
However, a user with appropriate privileges or a user with WRITE
access to the RTE pset can change the value of this attribute to allow
deletion of an RTE processor set in use. Refer to pset_setattr (2) for
supported values.
Processor Set Support
Use
sysconf() with _SC_PSET_SUPPORT
to see if the processor set functionality is supported by the
underlying HP-UX operating system version.
Use
sysconf() with _SC_PSET_RTE_SUPPORT
to see if the RTE processor set functionality is sup-
ported by the underlying HP-UX operating system version.
Security Restrictions
Some or all of the actions associated with this system call require the
PSET privilege. Processes owned by
the superuser have this privilege. Processes owned by other users may have this privilege, depending on
system configuration. See privileges(5) for more information about privileged access on systems that sup-
port fine-grained privileges.
EXAMPLES
Create a new processor set, and configure it as an RTE processor set:
#include <sys/rtpset.h>
psetid_t new_psetid;
int ret;
if ((ret = pset_create(&new_psetid)) < 0) {
perror("pset_create()");
exit(1);
}
if ((ret = __pset_rtctl(RTE_PSET_CONFIG, new_psetid, 0)) < 0) {
perror("__pset_rtctl()");
exit(2);
}
RETURN VALUE
__pset_rtctl() returns zero on successful completion for
RTE_PSET_CONFIG and
RTE_PSET_UNCONFIG
requests.
For
RTE_PSET_GETFIRSTPSET
and RTE_PSET_GETNEXTPSET requests, the ID of an RTE processor
set is returned if one is found.
Otherwise, -1 is returned and
errno is set to indicate the error.
ERRORS
__pset_rtctl fails if one or more of the following is true:
[EALREADY] The specified processor set pset is already configured as RTE processor set, and the
RTE_PSET_CONFIG request is issued.
[EINVAL] The request is invalid.
[EINVAL] The specified processor set pset is invalid.
[EINVAL] The specified processor set pset is not an RTE processor set, and RTE_PSET_UNCONFIG
request is issued.
[EINVAL] The request is RTE_PSET_GETNEXTPSET and there is no other RTE processor set after
pset.
26 Hewlett-Packard Company 3 HP-UX 11i Version 2: December 2007 Update