*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> freeb (9r)              



NAME    [Toc]    [Back]

       freeb - STREAMS: Frees a message block

SYNOPSIS    [Toc]    [Back]

       #include <sys/stream.h>

       void freeb(
               MBLKP message_block_ptr );

ARGUMENTS    [Toc]    [Back]

       Specifies  a  pointer  to  the message block to be deallocated.
  The typedef MBLKP is an alternate name for typedef
       struct msgb *.

DESCRIPTION    [Toc]    [Back]

       The  freeb  interface deallocates a message block.  If the
       reference count of the db_ref member of the  datab  structure
  is  greater  than  the value 1, freeb decrements the
       count. If db_ref equals the value 1, freeb deallocates the
       message block and the corresponding data block and buffer.

       If the data buffer to be freed was allocated in a call  to
       the  esballoc  interface,  the buffer may be a non-STREAMS
       resource. In that case, the driver must be  notified  that
       the  attached data buffer needs to be freed by calling the
       driver's freeing interface. To make this process  independent
  of  the  driver  used in the stream, freeb finds the
       free_rtn  structure  associated  with  the  buffer.    The
       free_rtn  structure contains a pointer to the driver-independent
 interface that releases the buffer. Once  this  is
       accomplished, freeb releases the STREAMS resources associated
 with the buffer.

RETURN VALUES    [Toc]    [Back]


SEE ALSO    [Toc]    [Back]

       Kernel Interfaces: allocb(9r), dupb(9r), esballoc(9r)

       Programmer's Guide: STREAMS

[ Back ]
 Similar pages
Name OS Title
freemsg Tru64 STREAMS: Frees all message blocks in a message
rmvb Tru64 STREAMS: Removes a message block from a message block
unlinkb Tru64 STREAMS: Removes a message block from the head of a message
allocb Tru64 STREAMS: Allocates a message block
msgb Tru64 Defines a STREAMS message block
copyb Tru64 STREAMS: Copies a message block
rmvq Tru64 STREAMS: Removes a message block from a queue
dupb Tru64 STREAMS: Duplicates a message block descriptor
esballoc Tru64 STREAMS: Allocates a message block with a shared buffer
contig_free Tru64 General: Frees a block of memory previously allocated by contig_malloc
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service