bcanputnext man page on Solaris

Man page or keyword search:  
man Server   20652 pages
apropos Keyword Search (all sections)
Output format
Solaris logo
[printable version]

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

NAME
       canputnext, bcanputnext - test for room in next module's message queue

SYNOPSIS
       #include <sys/stream.h>

       int canputnext(queue_t *q);

       int bcanputnext(queue_t *q, unsigned char pri);

INTERFACE LEVEL
       Architecture independent level 1 (DDI/DKI).

PARAMETERS
       q	Pointer to a message queue belonging to the invoking module.

       pri	Minimum priority level.

DESCRIPTION
       The  invocation	canputnext(q);	is  an	atomic	equivalent of the can‐
       put(q→q_next); routine. That is, the STREAMS framework  provides	 what‐
       ever  mutual  exclusion	is  necessary  to  insure that dereferencing q
       through its q_next field and then invoking canput(9F) proceeds  without
       interference 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	 pref‐
       erence to canput(q→q_next); and bcanput(q→q_next, pri); respectively.

       See canput(9F) and bcanput(9F) for further details.

RETURN VALUES
       1	If the message queue is not full.

       0	If the queue is full.

CONTEXT
       The  canputnext()  and bcanputnext() functions can be called from user,
       interrupt, or kernel context.

WARNINGS
       Drivers 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 ALSO
       bcanput(9F), canput(9F)

       Writing Device Drivers

       STREAMS Programming Guide

SunOS 5.10			  16 Jan 2006			canputnext(9F)
[top]

List of man pages available for Solaris

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net