*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Tru64 Unix man pages -> canput (9r)              
Title
Content
Arch
Section
 

canput(9r)

Contents


NAME    [Toc]    [Back]

       canput - STREAMS: Tests for room in a message queue

SYNOPSIS    [Toc]    [Back]

       #include <sys/stream.h>

       int canput(
               queue_t *message_queue );

ARGUMENTS    [Toc]    [Back]

       Specifies  a  pointer  to  the  message queue. The typedef
       queue_t is an alternate name for struct queue_entry *.

DESCRIPTION    [Toc]    [Back]

       The canput interface searches through the stream (starting
       at the message queue identified by the message_queue argument)
 until it finds  a  queue  that  contains  a  service
       interface  where  the  message can be enqueued or until it
       reaches the end of the stream.  If canput finds a  service
       interface  in  a queue, it tests the queue to determine if
       there is space in the queue to accommodate a message.   If
       the  queue  is  full, canput sets the q_flag member of the
       queue_entry structure pointer (the message queue)  to  the
       constant QWANTW to back-enable the caller's service interface.

NOTES    [Toc]    [Back]

       You are responsible for both testing a queue  with  canput
       and not placing a message on the queue if canput fails.

RETURN VALUES    [Toc]    [Back]

       The  canput  interface returns a value of 1 if the message
       queue is not full. It returns the value zero  (0)  if  the
       message queue is full.

SEE ALSO    [Toc]    [Back]

      
      
       Kernel Interfaces: bcanput(9r), putbq(9r), putnext(9r)

       Programmer's Guide: STREAMS



                                                       canput(9r)
[ Back ]
 Similar pages
Name OS Title
datamsg Tru64 STREAMS: Tests whether a message is a data message
insq Tru64 STREAMS: Inserts a STREAMS message into a queue
putq Tru64 STREAMS: Puts a message on a queue
getq Tru64 STREAMS: Gets a message from the front of the queue
flushq Tru64 STREAMS: Removes a message from a queue
putbq Tru64 STREAMS: Places a message at the head of a queue
rmvq Tru64 STREAMS: Removes a message block from a queue
putctl Tru64 STREAMS: Puts a control message on a queue
mq_open Tru64 Establishes the connection between a message queue and a message queue descriptor (P1003.1b)
bcanput Tru64 STREAMS: Tests for flow control in a specified priority band
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service