STREAMS-UX Programmer's Guide (February 2007)

STREAMS Utilities Supported by HP-UX
Appendix B
234
NAME
unweldq () – Disconnects previously established weld connection.
SYNOPSIS
#include <sys/stream.h>
int unweldq (queue_t *d1_wq, queue_t *d2_rq, queue_t *d2_wq, queue_t *d1_rq, weld_fcn_t
func, weld_arg_t arg, queue_t *protect_q);
PARAMETERS
d1_wq, d1_rq
First drivers’ write and read queues.
d2_wq, d2_rq
Second drivers’ write and read queues
func and arg
Optional callback function pointer and argument for callback.
protect_q
Optional synchronization queue to be acquired when
func
is executed.
DESCRIPTION
unweldq() operation sets d1_wq->q_next and d2_wq->q_next to NULL there by disconnecting the
previously established connection. unweldq() function does not actually perform this operation, instead it
sends an asynchronous request to the weld daemon to perform unweld operation on the specified queues.If
the
func
and protect_q are specified, the weld daemon acquires the synchronization queue before executing
the
func
.
However, if the caller does not need to be notified by the weld daemon, the parameters
func
,
arg
, and
protect_q
can be set to 0.
RETURN VALUES
unweldq() returns 0 on success and one of the error codes upon failure.
ENXIO Weld mechanism is not available.
EINVAL Invalid queue arguments.
EAGAIN Could not allocate weld record.
CONSTRAINTS
unweldq() can be called from thread or interrupt context. Only spinlocks of STREAMS/UX user lock order
can be held across this call.