mpctl.2 (2010 09)
m
mpctl(2) mpctl(2)
default, optimal policy in determining where the newly created LWP will be
launched. The existing binding of the LWP is not changed. The ldom argument
is ignored.
To change the processor assignment, locality domain assignment, or launch policy of another process, the
caller must either have the same effective user ID as the target process, or have the
PRIV_MPCTL
privilege.
Security Restrictions
Some or all of the actions associated with this system call require the
MPCTL 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
support fine-grained privileges.
RETURN VALUES
If
mpctl() fails, -1 is returned. If
mpctl is successful, the value returned is as specified for that
command/option.
NOTE: In some cases a negative number other than
-1 may be returned that indicates a successful
return.
ERRORS
In general,
mpctl() fails if one or more of the following is true:
[EACCES] pid or lwpid identifies a process or LWP that is not visible to the calling thread.
[EINVAL] request is an illegal number.
[EINVAL] request is MPC_GETNEXTSPU
or MPC_GETNEXTSPU_SYS and spu identifies the
last processor. Or request is
MPC_GETNEXTLDOM
or MPC_GETNEXTLDOM_SYS
and ldom identifies the last locality domain. Or request is
MPC_GETNEXTPROXIMATESPU
or MPC_GETNEXTPROXIMATESPU_SYS
and spu
identifies the last proximate spu.
[EINVAL] request is
MPC_GETNUMPROXIMATESPUS
or
MPC_GETNUMPROXIMATESPUS_SYS
or MPC_GETFIRSTPROXIMATESPU
or
MPC_GETFIRSTPROXIMATESPU_SYS
and spu is not enabled.
[EINVAL] request is to bind a process or an LWP to a processor or locality domain that is not
in the processor set of the specified process or LWP.
[EPERM] request is
MPC_SETPROCESS
, MPC_SETPROCESS_FORCE,orMPC_SETLDOM,
spu is not
MPC_SPUNOCHANGE
or MPC_LDOMNOCHANGE, pid identifies another
process, and the caller does not have the same effective user ID of the target process
or does not have the
PRIV_MPCTL privilege.
[EPERM] request is
MPC_SETPROCESS_RR
, MPC_SETPROCESS_FILL,
MPC_SETPROCESS_PACKED, MPC_SETPROCESS_LEASTLOAD
,
MPC_SETPROCESS_RR_TREE, MPC_SETPROCESS_FILL_TREE
,or
MPC_SETPROCESS_NONE, pid identifies another process, and the caller does not
have the same effective user ID of the target process, or does not have the
PRIV_MPCTL privilege.
[ESRCH] pid or lwpid identifies a process or LWP that does not exist.
SEE ALSO
getprivgrp(1), setprivgrp(1M), fork(2), getprivgrp(2), sysconf(2), pthread_processor_bind_np(3T),
pthread_launch_policy_np(3T), privgrp(4), compartments(5), privileges(5).
12 Hewlett-Packard Company − 12 − HP-UX 11i Version 3: September 2010