Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ esbbcall(D3) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       esbbcall(D3)                                            esbbcall(D3)


       NAME
             esbbcall - call a function when an externally-supplied buffer
             can be allocated

       SYNOPSIS
             #include <sys/types.h>
             #include <sys/stream.h>
             #include <sys/ddi.h>
             toid_t esbbcall(int pri, void (*func)(), long arg);

          Arguments
             pri       Priority of the esballoc(D3) allocation request.

             func      Function to be called when a buffer becomes
                       available.

             arg       Argument to the function to be called when a buffer
                       becomes available.

       DESCRIPTION
             If esballoc(D3) is unable to allocate a message block header
             and a data block header to go with its externally supplied
             data buffer, the function esbbcall can be used to schedule the
             routine func, to be called with the argument arg when memory
             becomes available.  esbbcall, like bufcall(D3), serves, in
             effect, as a timeout call of indeterminate length.

          Return Values
             On success, esbbcall returns a non-zero value that identifies
             the scheduling request.  On failure, esbbcall returns 0.

       USAGE
             When func runs, all interrupts from STREAMS devices will be
             blocked.  On multiprocessor systems, the interrupts will be
             blocked only on the processor on which func is running.  func
             will have no user context and may not call any function that
             sleeps.

             Even when func is called, esballoc can still fail if another
             module or driver had allocated the memory before func was able
             to call allocb.

             The pri argument is a hint to the allocator indicating how
             badly the buffer is needed.  BPRI_LO should be used for normal
             data allocations.  BPRI_MED should be used for other non-
             critical allocations.  BPRI_HI should be used for allocations


                           Copyright 1994 Novell, Inc.               Page 1













      esbbcall(D3)                                            esbbcall(D3)


            that absolutely must succeed, although success is not
            guaranteed.  Some implementations may choose to ignore this
            argument.

            The non-zero identifier returned by esballoc may be passed to
            unbufcall(D3) to cancel the request.

         Level
            Base or Interrupt.

         Synchronization Constraints
            Does not sleep.

            Driver-defined basic locks, read/write locks, and sleep locks
            may be held across calls to this function.

      REFERENCES
            allocb(D3), bufcall(D3), esballoc(D3), itimeout(D3),
            timeout(D3), unbufcall(D3)

      NOTICES
         Portability
            All processors

         Applicability
            ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp

            The esbbcall function is currently defined to return a toid_t
            data type.  In earlier releases, it returned an int.



















                          Copyright 1994 Novell, Inc.               Page 2








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