Query: merror
OS: opensolaris
Section: 9f
Links: opensolaris man pages all man pages forum categories
Format:Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
merror(9F) Kernel Functions for Drivers merror(9F)NAMEmerror - Send an M_ERROR message upstreamSYNOPSIS#include <sys/stream.h> #include <sys/strsun.h> void merror(queue_t *wq, mblk_t *mp, int error);INTERFACE LEVELSolaris DDI specific (Solaris DDI).PARAMETERSwq Write queue associated with the read queue to send the M_ERROR on. mp Optionally, a STREAMS message to convert to an M_ERROR. error Error code to include in the M_ERROR message.DESCRIPTIONThe merror() function constructs an M_ERROR message, and sends the resulting message upstream. If mp is NULL, merror() allocates a one-byte M_ERROR message. If mp is non-NULL, merror() attempts to convert the passed-in message to an M_ERROR. However, if the passed-in message has more than one reference (see dupmsg(9F)), or if it is of zero length, it is freed and a new message is allocated. If the allocation or conversion fails, merror() silently fails. Otherwise, the resulting one-byte data block is assigned the specified error code and sent upstream.RETURN VALUESNone.CONTEXTThis function can be called from user, kernel or interrupt context.NOTESCallers must not hold any locks across an merror() that can be acquired as part of put(9E) processing.SEE ALSOput(9E), dupmsg(9F) STREAMS Programming Guide SunOS 5.11 9 June 2004 merror(9F)