STREAMS-UX Programmer's Guide (February 2007)

Differences Between STREAMS/UX and System V Release 4 STREAMS
HP-UX Modifications to STREAMS/UX Utilities
Appendix E
267
The weld daemon will call func with arg as an argument after it finishes the request. The protect_q
specifies which queue the callback function can access safely. If the driver does not need to be notified when
the daemon finishes the weld request, pass weldq zero for the func, arg and protect_q parameters.
On successful completion, weldq returns 0. However, if weldq fails, an errno indicating the type of error that
has occurred is returned. The errno will contain one of the following three values:
ENXIO The weld daemon is not running.
EINVAL Invalid queue arguments exist.
EAGAIN No memory is available.
unweldq
The utility unweldq disconnects two drivers’ queues that were joined by weldq:.
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);
d1_wq, d1_rq One of the drivers’ write and read queues.
d2_wq, d2_rq The second driver’s queues.
func Callback function to be executed by the weld daemon.
arg, protect_q Parameters passed to the previous function.
The unweldq will set d1_wq->q_next and d2_wq->q_next to zero. Also, it updates internal queue fields used
for flow control that are not visible to the STREAMS programmer.
The unweldq returns to the caller before disconnecting the drivers. The unweldq requests that the STREAMS
weld daemon update the queues.
NOTE If one end of a pipe-like stream created by weld is closed, STREAMS will automatically unweld
the two drivers. unweldq does not need to be called.
The weld daemon will call func with arg as an argument after it finishes the request. protect_q specifies
which queue the callback function can access safely. If the driver does not need to be notified when the
daemon finishes the weld request, pass weldq zero for the func, arg and protect_q parameters.
On successful completion, unweldq returns 0. Otherwise, it returns an errno indicating the type of error that
occurred. One of the following four values will be returned:
ENXIO The weld daemon is not running.
EINVAL Invalid queue arguments are present.
EAGAIN No memory is available.
ENXIO The weld daemon is not running.