Query: unlinkb
OS: opensolaris
Section: 9f
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
unlinkb(9F) Kernel Functions for Drivers unlinkb(9F)NAMEunlinkb - remove a message block from the head of a messageSYNOPSIS#include <sys/stream.h> mblk_t *unlinkb(mblk_t *mp);INTERFACE LEVELArchitecture independent level 1 (DDI/DKI).PARAMETERSmp Pointer to the message.DESCRIPTIONThe unlinkb() function removes the first message block from the message pointed to by mp. A new message, minus the removed message block, is returned.RETURN VALUESIf successful, the unlinkb() function returns a pointer to the message with the first message block removed. If there is only one message block in the message, NULL is returned.CONTEXTThe unlinkb() function can be called from user, interrupt, or kernel context.EXAMPLESExample 1 unlinkb() example The routine expects to get passed an M_PROTO T_DATA_IND message. It will remove and free the M_PROTO header and return the remaining M_DATA portion of the message. 1 mblk_t * 2 makedata(mp) 3 mblk_t *mp; 4 { 5 mblk_t *nmp; 6 7 nmp = unlinkb(mp); 8 freeb(mp); 9 return(nmp); 10 }SEE ALSOlinkb(9F) Writing Device Drivers STREAMS Programming Guide SunOS 5.11 16 Jan 2006 unlinkb(9F)
Related Man Pages |
---|
linkb(9f) - sunos |
rmvb(9f) - sunos |
rmvq(9f) - sunos |
rmvq(9f) - debian |
rmvq(9f) - minix |
Similar Topics in the Unix Linux Community |
---|
file system full (1 block extent) |
removing a portion of a code from a file |
remove chunks of text from file |
Count Segmentation fault and write to the file |