freeze the state of a stream
Synopsis (Not in ODDI)
pl_t freezestr(queue_t *q);
freezestr sets the interrupt priority level to plstr
(if the current level is lower than plstr and the implementation
requires that interrupts be blocked while the
stream is frozen) and freezes the state of the stream containing the
queue specified by q.
Freezing the stream prevents any further entries into open, close, put,
and service procedures on the stream and prevents any messages from
being placed on or taken off any queues in the stream (except by the
caller of freezestr).
Freezing the stream does not automatically stop all functions that are running
within the stream;
functions will continue to run until they attempt to perform some operation
which changes the state of the stream, at which point
they will be forced to wait for the stream to be unfrozen by a call to
Pointer to a message queue.
freezestr returns the previous interrupt priority level which is
typically used in a subsequent call to unfreezestr.
Drivers and modules must freeze the stream while they manipulate its
queues directly. This includes searching the queues
and for the duration of any calls to
Base or Interrupt.
Does not block.
Driver-defined basic locks, read/write locks, and sleep locks
may be held across calls to this function.
freezestr should be used sparingly
as it is rarely necessary to freeze a stream
(most modules do not need to manipulate their queues directly)
and freezing a stream can have a significant negative effect
Calling freezestr to freeze a stream that is already frozen by
the caller will result in deadlock.
for an example of freezestr.
3, 5, 5mp, 6, 6mp, 7, 7mp, 7.1, 7.1mp, 8, 8mp
19 June 2005
© 2005 The SCO Group, Inc. All rights reserved.
OpenServer 6 and UnixWare (SVR5) HDK - June 2005