#include <sys/types.h> #include <sys/processor.h>
int p_online(processorid_t processorid , int flag );
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 LWP s 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 LWP s. The processor will become as inactive as possible.
When P_STATUS is specified, no change occurs, but the current status is returned.
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.