Appendix C


Utilities

C.1 COMMAND LIST

This chapter describes the following utilities.
adjmsg  (D3) trim bytes from a message
allocb  (D3) allocate a message block 
bcanput  (D3) test for flow control in a specified priority band 
bcanputnext  (D3) test for flow control in a specified priority band 
bufcall  (D3) call a function when a buffer becomes available 
canput  (D3) test for room in a message queue 
canputnext  (D3) test for flow control in a stream 
copyb  (D3) copy a message block 
copymsg  (D3) copy a message 
datamsg  (D3) test whether a message is a data message 
dupb  (D3) duplicate a message block 
dupmsg  (D3) duplicate a message 
enableok  (D3) allow a queue to be serviced 
esballoc  (D3) allocate a message block using an externally supplied buffer 
esbbcall  (D3) call a function when an externally supplied buffer can be allocated 
flushband  (D3) flush messages in a specified priority band 
flushq  (D3) flush messages on a queue 
freeb  (D3) free a message block 
freemsg  (D3) free a message 
freezestr  (D3) freeze the state of a stream 
getq  (D3) get the next message from a queue 
insq  (D3) insert a message into a queue 
linkb  (D3) concatenate two message blocks 
msgdsize  (D3) return number of bytes of data in a message 
msgpullup  (D3) concatenate bytes in a message 
noenable  (D3) prevent a queue from being scheduled 
OTHERQ  (D3) get a pointer to queue's partner queue 
pullupmsg  (D3) concatenate bytes in a message 
put  (D3) call a put procedure 
putbq  (D3) place a message at the head of a queue 
putctl  (D3) send a control message to a queue 
putctl1  (D3) send a control message with a one-byte parameter to a queue 
putnext  (D3) send a message to the next queue 
putnextctl   (D3) send a control message to a queue 
putnextctl1  (D3) send a control message with a one-byte parameter to a queue 
putq  (D3) put a message on a queue 
qenable  (D3) schedule a queue's service routine to be run 
qprocsoff  (D3) disable put and service routines 
qprocson  (D3) enable put and service routines 
qreply  (D3) send a message in the opposite direction in a stream 
qsize  (D3) find the number of messages on a queue 
RD  (D3) get a pointer to the read queue 
rmvb  (D3) remove a message block from a message 
rmvq  (D3) remove a message from a queue 
SAMESTR  (D3) test if next queue is of the same type 
strqget  (D3) get information about a queue or band of the queue 
strqset  (D3) change information about a queue or band of the queue 
unbufcall  (D3) cancel a pending bufcall request 
unfreezestr  (D3) unfreeze the state of a stream 
unlinkb  (D3) remove a message block from the head of the stream 
WR  (D3) get a pointer to the write queue 

C.2 COMMAND PAGE FORMAT

The kernel structure commands are described using the following command page format. The format will vary, since most command pages will contain only some of these sections.

NAME

SYNOPSIS DESCRIPTION EXAMPLES SEE ALSO  
Home

NAME SYNOPSIS DESCRIPTION SEE ALSO  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS

DESCRIPTION

 
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION EXAMPLES
           xxxput(q, mp)
           queue_t *q;
           mblk_t *mp;
             {
                if (datamsg(mp->b_datap->db_type)) {
                putq(q, mp);
                return;
                }
                switch (mp->b_datap->db_type) {
                case M_FLUSH:
           ...
                }
          }
 
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION Examples  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION

Warning

freezestr should be used sparingly as it is rarely necessary to freeze a stream (most modules do not need to manipulate their queues directly) and freezing a stream can have a significant negative effect on performance. 

Calling freezestr to freeze a stream that is already frozen by the caller will result in deadlock.

 
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION

Examples

 
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS

DESCRIPTION

 
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION Base or Interrupt.

Synchronization Constraints:

Does not sleep. Driver-defined mask locks may be held across calls to this function. In module, driver-defined locks must not be held.

The caller cannot have the stream frozen [see freezestr(D3)] when calling this function.

Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION

Warning

mp must point to an existing message in the queue pointed to by q, or a system panic will occur.
 
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION  
Home

NAME

SYNOPSIS DESCRIPTION
Home

Contents Previous Chapter Index Glossary