pcmsg man page on IRIX

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



pcmsg(D3)							     pcmsg(D3)

NAME
     pcmsg - test whether a message is a priority control message

SYNOPSIS
     #include <sys/types.h>
     #include <sys/stream.h>
     #include <sys/ddi.h>
     int pcmsg(uchar_t type);

   Arguments
     type      The type of message to be tested.

DESCRIPTION
     The pcmsg function tests the type of message to determine if it is a
     priority control message (also known as a high priority message).

   Return Values
     pcmsg returns 1 if the message is a priority control message and 0 if the
     message is any other type.

USAGE
     The db_type field of the datab(D4) structure contains the message type.
     This field may be accessed through the message block using mp->b_datap-
     >db_type.

   Level
     Base or Interrupt.

   Synchronization Constraints
     Does not sleep.

     Driver-defined basic locks, read/write locks, and sleep locks may be held
     across calls to this function.

   Examples
     The service routine processes messages on the queue.  If the message is a
     high priority message, or if it is a normal message and the stream is not
     flow-controlled, the message is processed and passed along in the stream.
     Otherwise, the message is placed back on the head of the queue and the
     service routine returns.

      1	   xxxsrv(q)
      2	       queue_t *q;
      3	   {
      4	       mblk_t *mp;
      5	       while ((mp = getq(q)) != NULL) {
      6		   if (pcmsg(mp->b_datap->db_type) || canputnext(q->g_next)) {
      7		       /* process message */
      8		       putnext(q, mp);
      9		   } else {
     10		       putbq(q, mp);

									Page 1

pcmsg(D3)							     pcmsg(D3)

     11		       return;
     12		   }
     13	       }
     14	   }

REFERENCES
     allocb(D3), datab(D4), msgb(D4), messages(D5)

									Page 2

[top]

List of man pages available for IRIX

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