HP-UX Reference (11i v2 07/12) - 2 System Calls (vol 5)
m
mpctl(2) mpctl(2)
MPC_SPUTOLDOM
This request returns the ID of the locality domain containing processor spu. The
pid argument is ignored.
Processor Core Information
For processor core topology use:
int mpctl(mpc_request_t request, spu_t spu, pid_t pid);
The request argument determines the precise action to be taken by
mpctl() and is one of the following:
MPC_GETNUMCORES_SYS
Returns the number of enabled processor cores in the system; this value will
always be greater than or equal to 1. The spu and pid arguments are ignored.
MPC_GETFIRSTCORE_SYS
Returns the processor core ID of the first enabled processor core in the system.
The spu and pid arguments are ignored.
MPC_GETNEXTCORE_SYS
Returns the processor core ID of the next enabled processor core in the system
after the specified processor core ID. The pid argument is ignored.
Typically MPC_GETFIRSTCORE_SYS
is called to determine the first processor
core.
MPC_GETNEXTCORE_SYS
is then called in a loop (until the call returns
-1) to determine the IDs of the remaining processor cores.
MPC_GETCURRENTCORE
Returns the ID of the processor core the calling thread is currently running on (not
the processor core assignment of the caller). The spu and pid arguments are
ignored.
Warning: The information returned by this system call may be out-of-date arbi-
trarily soon after the call completes due to the scheduler context switching the
caller onto a different processor.
MPC_SPUTOCORE
Returns the ID of the physical processor core containing the spu. The pid argu-
ment is ignored.
MPC_GETNUMCORES
Returns the number of processor cores in the processor set of the calling thread.
The spu and pid arguments are ignored.
MPC_GETFIRSTCORE
Returns the ID of the first processor core in the processor set of the calling thread.
The spu and pid arguments are ignored.
MPC_GETNEXTCORE
Returns the ID of the processor core in the processor set of the calling thread after
the processor core specified in spu. The pid argument is ignored.
Typically MPC_GETFIRSTCORE is called to determine the first processor core.
MPC_GETNEXTCORE is then called in a loop (until the call returns -1) to deter-
mine the IDs of the remaining processor cores in the processor set.
For processor core and locality domain topology use:
int mpctl(mpc_request_t request, ldom_t ldom, pid_t pid);
The request argument determines the precise action to be taken by mpctl() and is one of the following:
MPC_LDOMCORES_SYS
Returns the number of enabled processor cores in the locality domain. The pid
argument is ignored.
MPC_LDOMCORES
Returns the number of enabled processor cores assigned to the current processor
set in the locality domain. The pid argument is ignored.
200 Hewlett-Packard Company − 3 − HP-UX 11i Version 2: December 2007 Update