STREAMS-UX Programmer's Guide (February 2007)
STREAMS Utilities Supported by HP-UX
Appendix B
221
NAME
strqset () – Set the information in a queue or a queue band.
SYNOPSIS
#include <sys/types.h>
#include <sys/stream.h>
int strqset (queue_t *q, qfields_t what, uchar_t pri, long newval);
PARAMETERS
q
Pointer to the queue.
what
The field of the queue about which to return information. Valid what values are:
QHIWAT High water mark of the specified priority band.
QLOWAT Low water mark of the specified priority band.
QMAXPSZ Maximum packet size of the specified priority band.
QMINPSZ Minimum packet size of the specified priority band.
pri
Priority band of a queue to be modified
newval
The new value to be set in queue fields.
DESCRIPTION
This function provides modules and drivers with a way to easily update the different (modifiable) queue and
queue-band parameters without directly dereferencing queue pointers.
A queue belonging to a module/driver with a synchronization level of SQLVL_NOSYNC may be simultaneously
manipulated by multiple threads. Therefore, the queue specified by
q
must be frozen by calling freezestr()
before calling insq(), rmvq(), strqget(), and strqset(). A call to unfreezestr() must be made to
unfreeze the queue after the above operations are complete.
RETURN VALUES
strqset() returns 0 on success. Upon failure, one of the following error codes is returned.
EINVAL If the band specified in pri does not exist.
EPERM If caller specified any one of the following fields
QCOUNT
QFIRST
QLAST
QFLAG
ENOENT If QBAD is specified or unidentified value is passed to strqset().