Removes a previously established weld connection between STREAMS queues.
#include <sys/stream.h>
int unweldq ( q1, q2, q3, q4, func, arg, protect_q)
queue_t *q1;
queue_t *q2;
queue_t *q3;
queue_t *q4;
weld_fcn_t func;
weld_arg_t arg;
queue_t *protect_q;
The unweldq utility removes a weld connection previously established with the weld utility between two STREAMS queues (q1 and q2). The unweldq utility can be used to unweld two pairs of queues in one call (q1 and q2, q3 and q4).
The unwelding operation is performed by changing the first queue's q_next pointer so that it does not point to any queue. The unweldq utility does not actually perform the operation. Instead, it creates an unwelding request which STREAMS performs asynchronously. STREAMS acquires the appropriate synchronization queues before performing the operation.
Callers that need to know when the unwelding operation has actually taken place should specify a callback function (func parameter) when calling the unweldq utility. If the caller also specifies a synchronization queue (protect_q parameter) , STREAMS acquires the synchronization associated with that queue when calling func. If the callback function is not a protected STREAMS utility, such as the qenable utility, the caller should always specify a protect_q parameter. The caller can also use this parameter to synchronize callbacks with protected STREAMS utilities.
Upon successful completion, 0 (zero) is returned. Otherwise, an error code is returned.
The unweldq utility fails if the following is true:
Value | Description |
---|---|
EAGAIN | The weld record could not be allocated. The caller may try again. |
EINVAL | One or more parameters are not valid. |
ENXIO | The weld mechanism is not installed. |
List of Streams Programming References in AIX 5L Version 5.2 Communications Programming Concepts.
STREAMS Overview in AIX 5L Version 5.2 Communications Programming Concepts.
Welding Mechanism in AIX 5L Version 5.2 Communications Programming Concepts.
The weldq utility.