Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ phalloc(D3) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       phalloc(D3)                                              phalloc(D3)


       NAME
             phalloc - allocate and initialize a pollhead structure

       SYNOPSIS
             #include <sys/poll.h>
             #include <sys/kmem.h>
             #include <sys/ddi.h>
             struct pollhead *phalloc(int flag);

          Arguments
             flag      Specifies whether the caller is willing to sleep
                       waiting for memory.

       DESCRIPTION
             phalloc allocates and initializes a pollhead structure for use
             by non-STREAMS character drivers that wish to support polling.
             If flag is set to KM_SLEEP, the caller will sleep if necessary
             until sufficient memory is available.  If flag is set to
             KM_NOSLEEP, the caller will not sleep, but phalloc will return
             NULL if sufficient memory is not immediately available.

          Return Values
             On success, phalloc returns a pointer to the newly allocated
             pollhead structure.  If KM_NOSLEEP is specified and sufficient
             memory is not immediately available, phalloc returns a NULL
             pointer.

       USAGE
             On systems where the phalloc function is available, DDI/DKI
             conforming drivers should only use pollhead structures which
             have been allocated and initialized using phalloc.  Use of
             pollhead structures which have been obtained by any other
             means is prohibited on such systems.

          Level
             Base only if flag is set to KM_SLEEP.

             Initialization, Base or Interrupt 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.


                           Copyright 1994 Novell, Inc.               Page 1













      phalloc(D3)                                              phalloc(D3)


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

      REFERENCES
            chpoll(D2), phfree(D3)

      NOTICES
         Portability
            All processors

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




































                          Copyright 1994 Novell, Inc.               Page 2








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