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

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),

OmniOS April 9, 2016 OmniOS