p_online(2)
NAME
p_online − change processor online or offline status
SYNOPSIS
#include <sys/types.h>
#include <sys/processor.h>
int p_online(processorid_t processorid , int flag );
DESCRIPTION
The processor specified by the first argument is set online or offline or is unchanged, depending on whether the flag argument is P_ONLINE, P_OFFLINE, or P_STATUS.
When a flag of P_ONLINE is specified, the processor, if previously offline, is brought online and allowed to process LWPs and perform system activities.
When P_OFFLINE is specified, and the processor is not already offline, it is taken offline and not allowed to process LWPs. The processor will become as inactive as possible.
When P_STATUS is specified, no change occurs, but the current status is returned.
RETURN VALUES
On successful completion, the value returned is the previous state of the processor, P_ONLINE or P_OFFLINE. Otherwise, a value of −1 is returned and errno is set to indicate the error.
ERRORS
EPERM The effective user of the calling process is not superuser.
EINVAL An non-existent processor ID was specified or flag was invalid.
EBUSY flag was P_OFFLINE and the specified processor is the only online processor, there are currently LWPs bound to the processor, or the processor performs some essential function that cannot be performed by another processor.
SEE ALSO
psradm(1M), psrinfo(1M), processor_bind(2), processor_info(2), sysconf(3C)
SunOS 5.5 — Last change: 23 Sep 1992