DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
SVR5 and SCO OpenServer 5

free_rtn(D4str)


free_rtn -- STREAMS driver's message free routine structure

Synopsis

   #include <sys/stream.h>
   #include <sys/ddi.h>

Description

A free_rtn structure is needed for messages allocated with the esballoc(D3str) function.

Usage

Since the driver is providing the memory for the data buffer, a way is needed to notify the driver when the buffer is no longer in use. esballoc( ) associates the free routine structure with the message when it is allocated. When freeb(D3str) is called to free the message and the reference count goes to zero, the driver's message free routine is called, with the argument specified, to free the data buffer.

Structure definitions

The free_rtn structure is defined as type frtn_t and contains the following members:
   void	(*free_func)()	/* driver's free routine */
   char	*free_arg	/* argument to free_func() */

free_func
specifies the driver's function to be called when the message has been freed. It is called with interrupts from STREAMS devices that are blocked on the processor where the function is running.

free_arg
the only argument to the driver's free routine.

Hardware applicability

All

Version applicability

ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp, 8, 8mp
oddi: 1, 2, 2mp, 3, 3mp, 4, 4mp, 5, 5mp

References

esballoc(D3str), freeb(D3str)
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005