If numcpus is non-null, then on successful completion the number of processors in the processor set will be stored in the location pointed to by numcpus.

If numcpus and cpulist are both non-null, then cpulist points to a buffer where a list of processors assigned to the processor set is to be stored, and numcpus points to the maximum number of processor IDs
the buffer can hold. On successful completion, the list of processors up to the maximum buffer size is stored in the buffer pointed to by cpulist.

If pset is PS_NONE, the list of processors not assigned to any processor set will be stored in the buffer pointed to by cpulist, and the number of such processors will be stored in the location pointed to by numcpus.
The location pointed to by type will be set to PS_NONE.

If pset is PS_MYID, the processor list and number of processors returned will be those of the processor set to which the caller is bound. If the caller is not bound to a processor set, the result will be equivalent to setting pset to PS_NONE.

RETURN VALUES

Upon successful completion, 0 is returned. Otherwise, -1 is returned and errno is set to indicate the error.

ERRORS

The pset_info() function will fail if:

EFAULT

The location pointed to by type, numcpus, or cpulist was not null and not writable by the user.