Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ p_online(2) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

psradm(1M)






       p_online(2)                                              p_online(2)


       NAME
             p_online - take a processor online or offline

       SYNOPSIS
             #include <sys/types.h>
             #include <sys/processor.h>
             int p_online(processorid_t processorid, int flag);

       DESCRIPTION
             p_online brings the processor specified by processorid online
             or takes it offline.  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 flag is P_ONLINE, the specified processor is brought
             online.  If the processor was already online, nothing is done.
             The previous state of the processor (P_ONLINE or P_OFFLINE) is
             returned.

             If flag is P_OFFLINE, the specified processor is shut down and
             taken offline.  If the processor was already offline, nothing
             is done.  The previous state of the processor is returned.  An
             attempt to take a processor offline may fail for several
             reasons:

                   One or more processes are bound to the processor.

                   The processor is the only online processor.

                   The processor performs some essential system function
                   that cannot be taken over by another processor.

             The calling process must have appropriate privileges to bring
             a processor online or take it offline.

          Return Values
             On success, p_online returns P_ONLINE or P_OFFLINE.  On
             failure, p_online returns -1 and sets errno to identify the
             error.

          Errors
             In the following conditions, p_online fails and sets errno to:





                           Copyright 1994 Novell, Inc.               Page 1













      p_online(2)                                              p_online(2)


           EPERM  The calling process does not have appropriate privilege
                   for the operation.

           EINVAL The processorid does not refer to an existing processor,
                   or the processor for P_OFFLINE cannot be taken offline,
                   the number of processors has reached the limit, or the
                   flag has an invalid value.

           EBUSY  The processorid for P_OFFLINE refers to a processor with
                   processes bound to it, it is the only online processor,
                   or the processor performs some essential system
                   function that cannot be taken over by another
                   processor.

           EIO    The processor to which processorid refers cannot be
                   brought online.

      REFERENCES
            psradm(1M)

      NOTICES
         Considerations for Lightweight Processes
            Specific LWP, sets of LWPS, as well as entire processes can be
            bound to a processor.  See processor_bind(2).
























                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026