STREAMS/UX for the HP 9000 Reference Manual
42
Differences Between STREAMS/UX and System V Release 4 STREAMS
HP-UX Modifications to STREAMS/UX Utilities
Uniprocessor Synchronization” in this chapter and “Writing MP Scalable
Modules and Drivers” in Chapter 4 for more information about esballoc free
routines.
cmn_err
The STREAMS/UX cmn_err is the same as the cmn_err described in the
SVR4.2 Driver manual with a few differences. The HP-UX cmn_err always
sends messages to both the system console and the circular kernel buffer.
Inserting an exclamation point (“!”) or a circumflex (“^”) as the first
character in the format string has no effect. HP-UX simply removes these
control characters from the message, and sends the message to both the
console and the kernel buffer. There are a couple of other very minor
differences. HP-UX precedes CE_PANIC level messages with the string
panic: instead of PANIC:. Also, the HP-UX circular kernel buffer is called
msgbuf instead of putbuf. The HP-UX msgbuf is a fixed size, and can be
viewed using the dmesg command or the adb debugger tool.
freezestr and unfreezestr
The SVR4.2 Driver manual says that freezestr and unfreezestr must be called
on multiprocessors to protect searching a STREAMS/UX queue and calling
insq, rmvq, strqset, and strqget. SVR4 MP provides freezestr and
unfreezestr to prevent software on multiple processors from manipulating a
queue's list of messages at the same time. STREAMS/UX uses
synchronization levels for this. See “Writing MP Scalable Modules and
Drivers” in Chapter 4 for more information about synchronization levels and
HP-UX limitations on insq, rmvq, strqset, and strqget. Because
STREAMS/UX uses a different mechanism to protect STREAMS/UX
queues, the HP-UX freezestr just returns the current interrupt priority level,
and unfreezestr is a no-op. HP-UX provides the freezestr and unfreezestr
stubs to make porting code from SVR4 MP easier.
get_sleep_lock
STREAMS/UX provides some extra support for modules and drivers which
use the native HP-UX get_sleep_lock primitive. Alternatively, modules and
drivers can call the SVR4 MP SV_WAIT and SV_WAIT_SIG. Open and
close routines call get_sleep_lock before sleeping to prevent missing
wakeups. After calling get_sleep_lock, the open or close can release