CANPUTNEXT(9F) Kernel Functions for Drivers CANPUTNEXT(9F)

canputnext, bcanputnext
test for room in next message queue

#include <sys/stream.h>

canputnext(queue_t *q);

bcanputnext(queue_t *q, unsigned char pri);

The canputnext() and bcanputnext() functions atomically test for available space in the next linked queue or priority band. They are preferable to and safer than calling canput(9F) and bcanput(9F) directly on the queue linked to by q->q_next.

Drivers and modules should call these routines to ensure that room on the next queue exists before calling putnext(9F).

Architecture independent (DDI/DDK).

STREAMS queue.
Priority band to test.

These functions may be called in user, kernel, or interrupt context.

If the next message queue is not full.
If the next message queue is full.

STREAMS Programming Guide.

Writing Device Drivers.

bcanput(9F), canput(9F), putnext(9F),

April 9, 2016 OmniOS