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

p
pset_assign(2) pset_assign(2)
/*
* Initialize spu and new_pset first.
* spu identifies the processor to be reassigned, whereas
* new_pset identifies the target processor set.
*/
if ((ret = pset_assign(new_pset, spu, &old_pset)) < 0) {
perror("pset_assign");
exit(1);
}
RETURN VALUE
pset_assign returns zero on successful completion. Otherwise, -1 is returned and
errno is set to indi-
cate the error.
ERRORS
pset_assign fails if one or more of the following is true:
[EBUSY] The processor set currently assigned to the processor spu has active threads and processes,
and the processor set attributes do not allow this operation.
[EFAULT] The memory location pointed to by opset is not writable by the user.
[EINTR] The operation was interrupted.
[EINVAL] The processor spu or processor set pset is not valid.
[EINVAL] The spu is not enabled.
[EINVAL] The memory location pointed to by opset is
NULL
, and the PS_QUERY operation is
requested.
[ENOSYS] The processor set functionality is not supported by the underlying HP-UX version.
[EPERM] The user does not have necessary permissions to assign spu to pset.
SEE ALSO
mpctl(2), pset_bind(2), pset_ctl(2), pset_create(2), pset_destroy(2), pset_getattr(2), pset_setattr(2),
privgrp(4), privileges(5).
HP-UX 11i Version 2: December 2007 Update 2 Hewlett-Packard Company 261