STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
214
NAME
streams_put () – Allows non-STREAMS code to safely call STREAMS/UX utilities.
SYNOPSIS
#include <sys/stream.h>
void streams_put(streams_put_t func, queue_t *q, mblk_t *mp, void *arg);
PARAMETERS
func
Function to be executed in the STREAMS context.
q
Queue pointer.
mp
Pointer to valid message block.
arg
Argument pointer to be passed to
func
.
DESCRIPTION
Non-STREAMS/UX code can call streams_put, passing it a function and a queue. STREAMS/UX runs the
function as if it were the queue’s put procedure. The function can safely manipulate the queue and access the
same data structures as the queue’s put procedure. STREAMS/UX passes arg to the function. The caller may
pass any value in the argument. It is the responsibility of the caller to make sure that the queue being
specified is valid.
It is typically called by driver’s interrupt service routine or timeout or bufcall callback function.
RETURN VALUES
None
CONSTRAINTS
streams_put() can be called from thread or interrupt context. Spinlocks must not be held across this
function call.