p_online(3)p_online(3)NAMEp_online - Turns a processor on line or off line
SYNOPSIS
#include <sys/types.h> #include <sys/processor.h>
int p_online(
processorid_t processorid,
int flag );
LIBRARY
SVR4 Library (libsvr4)
OPERANDS
Type for processor name or CPU number. Return type.
DESCRIPTION
The p_online() function brings a processor on line or takes it off
line. When a processor is online, it is performing normal operations,
scheduling, and executing processes, and servicing any I/O devices to
which it has access.
If the flag is P_ONLINE, the named processor is brought on line. If
the processor was already on line, nothing is done. The previous state
of the processor (P_ONLINE or P_OFFLINE) is returned.
If the flag is P_OFFLINE, the named processor is taken off line. If
the processor was already off line, nothing is done. The previous state
of the processor (P_ONLINE or P_OFFLINE) is returned.
The calling process must have super user privileges to bring a proces‐
sor on line or take it off line.
NOTES
Some of the files that are referenced by absolute path in the System V
Environment for Tru64 UNIX reference pages actually may be located rel‐
ative to /usr/opt/svr4.
RESTRICTIONS
An attempt to take a processor off line may fail for several reasons.
See the ERRORS section for codes.
RETURN VALUES
Success. Failure.
ERRORS
Failure may result from: The calling process does not have appropriate
privileges. The processorid does not refer to an existing processor or
the processor for P_OFFLINE cannot be taken off line, or the flag has
an invalid value. The processorid for P_OFFLINE refers to a processor
with processes bound to it.
SEE ALSO
Commands: psradm(8), online(8), offline(8)p_online(3)