Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       physreq_prep(D3)                                    physreq_prep(D3)


       NAME
             physreq_prep - prepare a physical alignment requirements
             structure for use

       SYNOPSIS
             #include <sys/types.h>
             #include <sys/kmem.h>
             #include <sys/ddi.h>
             boolean_t physreq_prep(physreq_t *preqp, int flag);

          Arguments
             preqp     Pointer to a previously allocated physreq(D4)
                       structure.

             flag      Indicates whether the allocation may sleep or not,
                       and is set to KM_SLEEP or KM_NOSLEEP.

       DESCRIPTION
             physreq_prep prepares a physreq structure for use.  The
             physreq structure is used by routines to define alignment
             constraints on physical addresses.

          Return Values
             On success, physreq_prep returns B_TRUE.

             On failure, the routine returns B_FALSE, either due to
             allocation failure in the KM_NOSLEEP case or due to
             unsupportable constraints specified in preqp.

       USAGE
             physreq_prep must be called after all necessary fields in the
             structure pointed to by preqp have been set, but before the
             structure is passed to any I/O or allocation routine [for
             example, buf_breakup(D3), kmem_alloc_physreq(D3), or
             msgphysreq(D3)].

             This routine can be called multiple times on the same physreq
             structure.

             If the driver modifies the fields of the preqp after it has
             been prepped, then the driver must call physreq_prep again
             before actually using it.

          Level
             Base only if flag is set to KM_SLEEP.



                           Copyright 1994 Novell, Inc.               Page 1













      physreq_prep(D3)                                    physreq_prep(D3)


            Initialization or Base if flag is set to KM_NOSLEEP.

         Synchronization Constraints
            May sleep if flag is set to KM_SLEEP.

            Driver-defined basic locks and read/write locks may be held
            across calls to this function if flag is KM_NOSLEEP, but may
            not be held if flag is KM_SLEEP.

            Driver-defined sleep locks may be held across calls to this
            function regardless of the value of flag.

      REFERENCES
            buf_breakup(D3), kmem_alloc_physreq(D3),
            kmem_zalloc_physreq(D3), msgphysreq(D3), physreq_alloc(D3),
            physreq_free(D3), physreq(D4)

      NOTICES
         Portability
            All processors

         Applicability
            ddi: 5, 5mp, 6, 6mp, 7, 7mp

























                          Copyright 1994 Novell, Inc.               Page 2








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