STREAMS-UX Programmer's Guide (February 2007)
STREAMS Utilities Supported by HP-UX
Appendix B
194
NAME
putctl () – Send a control message to the queue.
SYNOPSIS
#include <sys/stream.h>
int putctl(queue_t *q, int type);
PARAMETERS
q
The queue to which the message is sent.
type
The type of control message to be allocated and passed to the put procedure of the queue.
DESCRIPTION
This function allocates a message block and assigns the specified control message type. Then it invokes the
put procedure for the specified queue with this newly allocated message. The putctl() returns an error if the
specified message type is M_DATA, M_PROTO or M_PCPROTO, or if memory allocation fails.
RETURN VALUES
putctl returns 1 on success and 0 on failure.
CONSTRAINTS
putctl() can be called from thread or interrupt context. Spinlocks must not be held across the calls to
putctl() function.