esballoc man page on IRIX

Man page or keyword search:  
man Server   31559 pages
apropos Keyword Search (all sections)
Output format
IRIX logo
[printable version]



esballoc(D3)							  esballoc(D3)

NAME
     esballoc - allocate a message block using an externally-supplied buffer

SYNOPSIS
     #include <sys/types.h>
     #include <sys/stream.h>
     #include <sys/ddi.h>
     mblk_t *esballoc(uchar_t *base, int size, int pri, frtn_t *fr_rtnp);

   Arguments
     base      Address of driver-supplied data buffer.

     size      Number of bytes in data buffer.

     pri       Priority of allocation request (used to allocate the message
	       and data blocks).

     fr_rtnp   Pointer to the free-routine data structure.

DESCRIPTION
     esballoc creates a STREAMS message and attaches a driver-supplied data
     buffer in place of a STREAMS data buffer.	It allocates a message and
     data block header only.  The driver-supplied data buffer, pointed to by
     base, is used as the data buffer for the message.

     When freeb(D3) is called to free the message, on the last reference to
     the message, the driver's free-routine, specified by the free_func field
     in the free_rtn(D4) structure, is called with one argument, specified by
     the free_arg field, to free the data buffer.

   Return Values
     On success, a pointer to the newly allocated message block is returned.
     On failure, NULL is returned.

USAGE
     Instead of requiring a specific number of arguments, the free_arg field
     is defined of type char *.	 This way, the driver can pass a pointer to a
     structure if more than one argument is needed.

     When the free_func function runs, interrupts from all STREAMS devices
     will be blocked.  It has no user context and may not call any routine
     that sleeps.  The function may not access any dynamically allocated data
     structures that might no longer exist when it runs.

     The pri argument is no longer used, but is retained for compatibility.
     Some implementations may choose to ignore this argument.

   Level
     Base or Interrupt.

									Page 1

esballoc(D3)							  esballoc(D3)

   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), esbbcall(D3), freeb(D3), free_rtn(D4)

									Page 2

[top]

List of man pages available for IRIX

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net