Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ arsop(2) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

arsctl(2)

array_sessions(5)



arsop(2)                                                              arsop(2)



NAME
     arsop - perform an operation on an array session

SYNOPSIS
     #include <sys/arsess.h>

     int arsop(int func, asht ash, void *bufptr, int buflen);

DESCRIPTION
     The arsop function performs an operation on the array session identified
     by the handle ash.  If ash is less than 0, then the operation is
     performed on the array session that is associated with the calling
     process.

     Most array session operations take some sort of argument.  A pointer to
     the argument is passed as bufptr, and the length of the argument is
     specified with buflen.

     The particular operation to be performed is identified by the function
     code func, which is defined in <sys/arsess.h>.  Available array session
     operations include:

     ARSOPNOP
            No operation involving the array session itself will be performed,
            but the function will fail if the specified array session does not
            exist.  This is a convenient way to determine if an array session
            is active.

     ARSOPGETSPI
            Obtains the Service Provider Information associated with the array
            session and stores it into the buffer pointed to by bufptr.  If
            the argument buffer is too small to accomodate all of the Service
            Provider Information, the data will be truncated.  If the argument
            buffer is larger than the Service Provider Information associated
            with the array session, the data will be padded on the right with
            zeroes.

     ARSOPSETSPI
            Sets the Service Provider Information associated with the array
            session to the contents of the buffer pointed to by bufptr.  If
            the argument buffer is too small, the Service Provider Information
            will be padded on the right with zeroes.  If the argument buffer
            is too large, an EINVAL error will occur.  If bufptr is NULL, then
            buflen is ignored and the array session will use the system
            default service provider information (typically all zeroes, though
            it can be changed with arsctl(2)).  The caller must be privileged
            to use this function.

     ARSOPGETSPILEN
            Returns the number of bytes of storage that have been allocated
            for the Service Provider Information that is associated with the
            array session.  The value is stored as an int at the location



                                                                        Page 1





arsop(2)                                                              arsop(2)



            specified by bufptr.  This can be used to determine the size of
            the buffer that is required for the ARSOPGETSPI and ARSOPSETSPI
            functions.

     ARSOPSETSPILEN
            Sets the length of the Service Provider Information associated
            with the array session to value of the int pointed to by bufptr.
            An EINVAL error will occur if the value is negative or is greater
            than the system maximum value (typically 1024), and the current
            setting will remain unchanged.  If the array session currently has
            non-default service provider information associated with it, then
            that information will either be truncated or extended with zeroes
            on the end to accomodate the new length.  The caller must be
            privileged to use this function.

     ARSOPFLUSHACCT
            Flushes any accounting data for the array session.  If array
            session accounting is active (see extacct(5)), then a record
            reporting the resource usage information that has been accumulated
            by the array session will be written.  As is always the case with
            array session accounting, if two or more members of the array
            session have different real UID's or GID's, it is unpredictable
            whose UID/GID will be included in the array session accounting
            record.  If a flush operation has already been performed, then the
            data reported by a subsequent flush or by the termination of the
            array session will only include resources that have been consumed
            since the last flush operation.  Array session accounting records
            that are written using this operation will be marked as "flushed"
            to indicate that subsequent records for the same array session may
            be forthcoming.  Under normal circumstances, the resource usage
            for an array session only includes the resources used by processes
            that have already terminated; the flushed accounting data will not
            include the resources used by any members of the array session
            that are still running.  The caller must be privileged to invoke
            this function.

     ARSOPGETINFO
            Obtains information about the array session and stores it in the
            buffer pointed to by bufptr.  The format of the data is defined by
            the arsesst structure, which can be found in <sys/arsess.h>.
            Note that the data in an arsesst is system-dependent and subject
            to change without notice from one release of IRIX to another.

     ARSOPGETCHGD
            Obtains information about resources that have already been charged
            to the array session in some way.  Typically, this would be done
            by invoking the ARSOP_FLUSHACCT function against the array
            session.  The format of the data is defined by the shacctt
            structure, which can be found in <sys/extacct.h>, and is stored in
            the buffer pointed to by bufptr.  Note that the data in an
            shacctt is system-dependent and subject to change without notice
            from one release of IRIX to another.



                                                                        Page 2





arsop(2)                                                              arsop(2)



     ARSOPRESTRICTNEW
            Restricts any process in the array session from starting a new
            array session (for example, using newarraysess(2)).  If a
            privileged process in such an array session subsequently decides
            that it needs to start a new array session, it must first clear
            the restriction using the ARSOPALLOWNEW function.  A process can
            determine if its array session has been restricted by using the
            ARSOPGETINFO function.

     ARSOPALLOWNEW
            Removes any restrictions against starting new array sessions that
            may have been placed on the array session by the
            ARSOPRESTRICTNEW function.  The caller must be privileged to use
            this function.

ERRORS
     arsop may fail if one or more of these conditions are true:

     EFAULT    bufptr is not a valid address

     EINVAL    func is not a valid function code

     EINVAL    The argument pointed to by bufptr is not valid

     EPERM     The current process does not have the appropriate privileges to
               perform the operation specified by func.

     ESRCH     The array session specified by ash is not currently active.

SEE ALSO
     arsctl(2), array_sessions(5).

DIAGNOSTICS
     Upon successful completion, arsop returns a value of 0.  Otherwise, a
     value of -1 is returned and errno is set to indicate the error.




















                                                                        Page 3



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