CANPUTNEXT(9F) Kernel Functions for Drivers CANPUTNEXT(9F)
canputnext, bcanputnext - test for room in next message queue
#include <sys/stream.h>
int
canputnext(queue_t *q);
int
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).
q STREAMS queue.
pri Priority band to test.
These functions may be called in user, kernel, or interrupt context.
1 If the next message queue is not full.
0 If the next message queue is full.
STREAMS Programming Guide.
Writing Device Drivers.
bcanput(9F), canput(9F), putnext(9F),
illumos April 9, 2016 illumos
NAME
canputnext, bcanputnext - test for room in next message queue
SYNOPSIS
#include <sys/stream.h>
int
canputnext(queue_t *q);
int
bcanputnext(queue_t *q, unsigned char pri);
DESCRIPTION
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).
INTERFACE LEVEL
Architecture independent (DDI/DDK).
PARAMETERS
q STREAMS queue.
pri Priority band to test.
CONTEXT
These functions may be called in user, kernel, or interrupt context.
RETURN VALUES
1 If the next message queue is not full.
0 If the next message queue is full.
SEE ALSO
STREAMS Programming Guide.
Writing Device Drivers.
bcanput(9F), canput(9F), putnext(9F),
illumos April 9, 2016 illumos