Query: bcanputnext
OS: php
Section: 9f
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
canputnext(9F) Kernel Functions for Drivers canputnext(9F)NAMEcanputnext, bcanputnext - test for room in next module's message queueSYNOPSIS#include <sys/stream.h> int canputnext(queue_t *q); int bcanputnext(queue_t *q, unsigned char pri);INTERFACE LEVELArchitecture independent level 1 (DDI/DKI).PARAMETERSq Pointer to a message queue belonging to the invoking module. pri Minimum priority level.DESCRIPTIONThe invocation canputnext(q); is an atomic equivalent of the canput(q->q_next); routine. That is, the STREAMS framework provides whatever mutual exclusion is necessary to insure that dereferencing q through its q_next field and then invoking canput(9F) proceeds without inter- ference from other threads. bcanputnext(q, pri); is the equivalent of the bcanput(q->q_next, pri); routine. canputnext(q); and bcanputnext(q, pri); should always be used in preference to canput(q->q_next); and bcanput(q->q_next, pri); respec- tively. See canput(9F) and bcanput(9F) for further details.RETURN VALUES1 If the message queue is not full. 0 If the queue is full.CONTEXTcanputnext() and bcanputnext() can be called from user or interrupt context.WARNINGSDrivers are responsible for both testing a queue with canputnext() or bcanputnext() and refraining from placing a message on the queue if the queue is full.SEE ALSObcanput(9F), canput(9F) Writing Device Drivers STREAMS Programming Guide SunOS 5.10 31 Jan 1993 canputnext(9F)