STREAMS/UX for the HP 9000 Reference Manual
43
Differences Between STREAMS/UX and System V Release 4 STREAMS
HP-UX Modifications to STREAMS/UX Utilities
spinlocks before sleeping. Other processes cannot wakeup the open or close
between the time it calls get_sleep_lock and sleep. Modules and drivers
must include strenv.h to use get_sleep_lock. strenv.h redefines
get_sleep_lock to streams_get_sleep_lock. Modules and drivers cannot call
the native HP-UX get_sleep_lock directly, because STREAMS/UX needs to
do some additional synchronization before invoking get_sleep_lock.
lock_t *
get_sleep_lock(event);
caddr_t event;
The open or close routine passes the event it will pass to the sleep primitive
to get_sleep_lock. get_sleep_lock obtains a sleep spinlock, and returns a
pointer to this lock.
itimeout
If the HP-UX itmeout cannot allocate memory, it panics instead of returning
0 like the SVR4 MP itimeout. The STREAMS/UX itimeout only returns 0 if
it is passed an interrupt priority level that is lower than pltimeout. You can
increase the amount of memory available to both the new itimeout and the
existing timeout primitives using the NCALLOUT tunable. Set
NCALLOUT to the maximum number of itimeout and timeout requests that
can be outstanding at any one time.
kmem_alloc
The STREAMS/UX kmem_alloc tries to allocate 32 bytes if the size
parameter is set to 0. The SVR4.2 kmem_alloc returns NULL instead.
LOCK
The STREAMS/UX LOCK calls the native HP-UX spinlock primitive.
LOCK 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 need to raise the
interrupt level can ignore this parameter. Since the HP-UX spinlock
primitive always raises the interrupt level to spl6 while a spinlock is held,
STREAMS/UX ignores the interrupt level parameter on multiprocessor
systems. For better performance on uniprocessor systems, the
STREAMS/UX LOCK raises the priority level to the parameter value