STREAMS-UX Programmer's Guide (February 2007)
STREAMS Utilities Supported by HP-UX
Appendix B
190
NAME
pcmsg () – Checks if a specified message type is a priority control message.
SYNOPSIS
#include <sys/stream.h>
int pcmsg (uchar_t type);
PARAMETERS
type
The type of the message to be tested.
DESCRIPTION
pcmsg() is used by put and service procedures of a module or driver. Typical use of pcmsg is for a put
procedure to determine whether to process the message immediately or to place it on the queue for deferred
processing.
The message type of a message is available in the db_type field of the datab structure.
RETURN VALUES
pcmsg returns a 1 if the type is high priority (db_type >= QPCTL). All other message types cause it to return
a 0.
CONSTRAINTS
pcmsg() can be called from thread or interrupt context. Spinlocks can be held across this call.