Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ physreq_alloc(D3) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       physreq_alloc(D3)                                  physreq_alloc(D3)


       NAME
             physreq_alloc - allocate a physical alignment requirements
             structure

       SYNOPSIS
             #include <sys/kmem.h>
             #include <sys/ddi.h>
             physreq_t *physreq_alloc(int flag);

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

       DESCRIPTION
             physreq_alloc allocates a physreq(D4) structure, which is used
             by such routines as kmem_alloc_physreq(D3),
             allocb_physreq(D3), and buf_breakup(D3) to define alignment
             constraints on physical addresses.

          Return Values
             On success, physreq_alloc returns a pointer to a physreq
             structure.

             This physreq is initialized with minimal values in all fields.
             That is, it specifies no constraints; any memory will satisfy
             this physreq.  The caller can then (directly or indirectly)
             set just those parameters which need to be constrained.

             If KM_NOSLEEP is specified and sufficient memory is not
             immediately available, physreq_alloc returns a NULL pointer.

       USAGE
             physreq_alloc is typically called at driver startup time to
             allocate a physreq structure for each controller.  This
             physreq is then used repeatedly, for each transfer or
             allocation.

             The physreq must be prepped before it is used by calling
             routine physreq_prep(D3).

          Level
             Base only if flag is set to KM_SLEEP.

             Initialization or Base if flag is set to KM_NOSLEEP.




                           Copyright 1994 Novell, Inc.               Page 1













      physreq_alloc(D3)                                  physreq_alloc(D3)


         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
            allocb_physreq(D3), buf_breakup(D3), kmem_alloc_physreq(D3),
            kmem_zalloc_physreq(D3), physreq_free(D3), physreq_prep(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