freeb(D3)
freeb - free a message block
As shipped in IRIX 6.5.19. Unchanged since IRIX 6.5.
NAME freeb - free a message block SYNOPSIS #include <sys/stream.h> #include <sys/ddi.h> void freeb(mblk_t *bp); Arguments bp Pointer to the message block to be deallocated. DESCRIPTION freeb deallocates a message block. If the reference count of the db_ref member of the datab(D4) structure is greater than 1, freeb decrements the count and returns. Otherwise, if db_ref equals 1, it deallocates the message block and the corresponding data block and buffer. If the data buffer to be freed was allocated with esballoc(D3), the driver is notified that the attached data buffer needs to be freed by calling the free-routine [see free_rtn(D4)] associated with the data buffer. Once this is accomplished, freeb releases the STREAMS resources associated with the buffer. Return Values None USAGE 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. Examples See copyb(D3) for an example of freeb. REFERENCES allocb(D3), dupb(D3), esballoc(D3), datab(D4), free_rtn(D4), msgb(D4)