Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ freezestr(D3) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       freezestr(D3)                                          freezestr(D3)


       NAME
             freezestr - freeze the state of a stream

       SYNOPSIS
             #include <sys/types.h>
             #include <sys/stream.h>
             #include <sys/ddi.h>
             pl_t freezestr(queue_t *q);

          Arguments
             q         Pointer to a message queue.

       DESCRIPTION
             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
             unfreezestr(D3).

          Return Values
             freezestr returns the previous interrupt priority level which
             is typically used in a subsequent call to unfreezestr.

       USAGE
             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 insq(D3),
             rmvq(D3), strqset(D3), and strqget(D3).

          Level
             Base or Interrupt.

          Synchronization Constraints
             Does not sleep.



                           Copyright 1994 Novell, Inc.               Page 1













      freezestr(D3)                                          freezestr(D3)


            Driver-defined basic locks, read/write locks, and sleep locks
            may be held across calls to this function.

         Warnings
            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 on performance.

            Calling freezestr to freeze a stream that is already frozen by
            the caller will result in deadlock.

         Examples
            See insq(D3) for an example of freezestr.

      REFERENCES
            unfreezestr(D3)

      NOTICES
         Portability
            All processors

         Applicability
            ddi: 3, 5, 5mp, 6, 6mp, 7, 7mp
























                          Copyright 1994 Novell, Inc.               Page 2








Typewritten Software • bear@typewritten.org • Edmonds, WA 98026