STREAMS/UX for the HP 9000 Reference Manual

41
Differences Between STREAMS/UX and System V Release 4 STREAMS
HP-UX Modifications to STREAMS/UX Utilities
In addition, HP-UX provides the following new utilities.
get_sleep_lock
putctl2
putnextctl2
streams_put
unweldq
weldq
The strenv.h file redefines some native HP-UX kernel utilities to conform to
System V Release 4.2. The strenv.h file redefines delay, get_sleep_lock,
kmem_alloc, kmem_free, lbolt, max, min, sleep, time, timeout, and
untimeout. These defines might collide with declarations in STREAMS/UX
modules and drivers. You can customize the strenv.h file to avoid collisions
or to use native HP-UX utilities. However, modules and drivers cannot call
the native HP-UX sleep or get_sleep_lock directly. If your modules and
drivers call sleep or get_sleep_lock, you must include strenv.h to redefine
sleep and get_sleep_lock to streams_mpsleep and streams_get_sleep_lock.
For more information about the native HP-UX primitives, see the HP-UX
Driver Development Guide, part number 98577-90014.
Differences between the STREAMS/UX kernel utilities and the descriptions
in the SVR4.2 Driver manual are discussed below, along with information
about new utilities. This section assumes that modules and drivers include
strenv.h.
esballoc
The STREAMS/UX esballoc is the same as the esballoc call described in the
SVR4.2 Driver manual with a few differences. The HP-UX esballoc copies
the contents of the fr_rtn structure into an area of the data block not visible
to the STREAMS/UX programmer. Then esballoc stores a pointer to this
area in the db_freep field. This allows modules and drivers to modify the
fr_rtn parameter after calling esballoc without affecting subsequent freeb
calls. Also, modules and drivers can change a data block's fr_rtn
information by modifying the structure pointed to by db_freep. The free
routine passed to esballoc can call STREAMS/UX utilities in the same way
as the put or service routine that called freeb. Also, a free routine can safely
access the same data structures as the put or service routine that called freeb.
However, unlike SVR4.2, HP-UX does not block interrupts from all
STREAMS/UX devices while the free routine runs. See “STREAMS/UX