Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ datamsg(D3) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       datamsg(D3)                                              datamsg(D3)


       NAME
             datamsg - test whether a message is a data message

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

          Arguments
             type      The type of message to be tested.

       DESCRIPTION
             The datamsg function tests the type of message to determine if
             it is a data message type (M_DATA, M_DELAY, M_PROTO, or
             M_PCPROTO).

          Return Values
             datamsg returns 1 if the message is a data message and 0 if
             the message is any other type.

       USAGE
             The db_type field of the datab 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 put(D2) routine enqueues all data messages for handling by
             the srv(D2) (service) routine.  All non-data messages are
             handled in the put routine.

              1  xxxput(q, mp)
              2    queue_t *q;
              3    mblk_t *mp;
              4  {
              5    if (datamsg(mp->b_datap->db_type)) {
              6          putq(q, mp);


                           Copyright 1994 Novell, Inc.               Page 1













      datamsg(D3)                                              datamsg(D3)


             7          return;
             8    }
             9    switch (mp->b_datap->db_type) {
            10    case M_FLUSH:
                  ...
            11    }
            12  }

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

      NOTICES
         Portability
            All processors

         Applicability
            ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp































                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026