STREAMS/UX for the HP 9000 Reference Manual
48
Differences Between STREAMS/UX and System V Release 4 STREAMS
HP-UX Modifications to STREAMS/UX Utilities
TRYLOCK
The STREAMS/UX TRYLOCK calls the native HP-UX cspinlock
primitive. TRYLOCK has an interrupt priority level parameter, which is
used to raise the priority level and block interrupts which acquire the
spinlock. The SVR4.2 Driver manual says that implementations which do
not require the interrupt level to be raised can ignore this parameter.
STREAMS/UX ignores the parameter on multiprocessor systems since the
HP-UX cspinlock primitive always raises the interrupt level to spl6 while a
spinlock is held. For better performance on uniprocessor systems, the
STREAMS/UX TRYLOCK raises the priority level to the parameter value
instead of acquiring a spinlock.
UNLOCK
The STREAMS/UX UNLOCK calls the native HP-UX spinunlock
primitive. UNLOCK has an interrupt priority level parameter, which is used
to lower the priority level. HP-UX will ignore this parameter on
multiprocessor systems. If the caller is not holding any other spinlocks, the
STREAMS/UX UNLOCK lowers the priority level to the value before the
caller acquired the spinlock. On uniprocessor systems, the STREAMS/UX
UNLOCK lowers the priority level to the parameter value instead of
releasing a spinlock.
weldq and unweldq
STREAMS/UX provides the additional utilities weldq and unweldq to allow
the user to build a pipe-like stream. These utilities are provided because the
programmer is not allowed to modify q_next pointers directly. This
restriction and others are described in more detail in the section called
“HP-UX Changes to STREAMS/UX Data Structures.”