[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    p_online(2) manual page Table of Contents

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 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.

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 LWP s 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)


Table of Contents