Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ SV_WAIT_SIG(D3) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       SV_WAIT_SIG(D3)                                      SV_WAIT_SIG(D3)


       NAME
             SV_WAIT_SIG - sleep on a synchronization variable

       SYNOPSIS
             #include <sys/types.h>
             #include <sys/ksynch.h>
             #include <sys/ddi.h>
             bool_t SV_WAIT_SIG(sv_t *svp, int priority, lock_t *lkp);

          Arguments
             svp       Pointer to the synchronization variable on which to
                       sleep.

             priority  A hint to the scheduling policy as to the relative
                       priority the caller wishes to be assigned while
                       running in the kernel after waking up.

             lkp       Pointer to a basic lock which must be locked when
                       SV_WAIT_SIG is called.  The basic lock is released
                       when the calling process goes to sleep, as described
                       below.

       DESCRIPTION
             SV_WAIT_SIG causes the calling process to go to sleep (the
             caller's execution is suspended and other processes may be
             scheduled) waiting for a call to SV_SIGNAL(D3) or
             SV_BROADCAST(D3) for the synchronization variable specified by
             svp.

          Return Values
             SV_WAIT_SIG returns TRUE (a non-zero value) if the caller woke
             up because of a call to SV_SIGNAL or SV_BROADCAST, or if the
             caller was stopped and subsequently continued.  SV_WAIT_SIG
             returns FALSE (zero) if the caller woke up and returned early
             because of a signal other than a job control stop signal, or
             by a job control stop signal that did not result in the caller
             stopping because the signal had a non-default disposition.

       USAGE
          priority Argument
             Valid values for priority are:

                   pridisk   Priority appropriate for disk driver.





                           Copyright 1994 Novell, Inc.               Page 1













      SV_WAIT_SIG(D3)                                      SV_WAIT_SIG(D3)


                  prinet    Priority appropriate for network driver.

                  pritty    Priority appropriate for terminal driver.

                  pritape   Priority appropriate for tape driver.

                  prihi     High priority.

                  primed    Medium priority.

                  prilo     Low priority.

            Drivers may use these values to request a priority appropriate
            to a given type of device or to request a priority that is
            high, medium or low relative to other activities within the
            kernel.
            It is also permissible to specify positive or negative offsets
            from the values defined above.  Positive offsets result in
            more favorable priority.  The maximum allowable offset in all
            cases is 3 (that is, pridisk+3 and pridisk-3 are valid values
            but pridisk+4 and pridisk-4 are not valid).  Offsets can be
            useful in defining the relative importance of different locks
            or resources that may be held by a given driver.  In general,
            a higher relative priority should be used when the caller is
            sleeping waiting for a highly contended kernel resource, or
            when the caller is already holding one or more locks or kernel
            resources upon entry to SV_WAIT_SIG.
            The exact semantic of the priority argument is specific to the
            scheduling class of the caller, and some scheduling classes
            may choose to ignore the argument for the purposes of assign-
            ing a scheduling priority.

         lkp Argument
            The basic lock specified by lkp must be held upon entry.  The
            lock is released and the interrupt priority level is set to
            plbase (block no interrupts) after the process is queued on
            the synchronization variable but prior to context switching to
            another process.  When the caller returns from SV_WAIT_SIG the
            basic lock is not held and the interrupt priority level is
            equal to plbase.

         General Considerations
            SV_WAIT_SIG may be interrupted by a signal, in which case it
            will return early without waiting for a call to SV_SIGNAL or
            SV_BROADCAST.



                          Copyright 1994 Novell, Inc.               Page 2













       SV_WAIT_SIG(D3)                                      SV_WAIT_SIG(D3)


             If the function is interrupted by a job control stop signal
             (e.g. SIGSTOP, SIGTSTP, SIGTTIN, SIGTTOU) which results in the
             caller entering a stopped state, when continued, the
             SV_WAIT_SIG function will return TRUE as if the process had
             been awakened by a call to SV_SIGNAL or SV_BROADCAST.

             If the function is interrupted by a signal other than a job
             control stop signal, or by a job control stop signal that does
             not result in the caller stopping (because the signal has a
             non-default disposition), the SV_WAIT_SIG call will return
             FALSE.

          Level
             Base only.

          Synchronization Constraints
             Can sleep.

             Driver-defined basic locks (with the exception of the lock
             specified by lkp) and read/write locks may not be held across
             calls to this function.

             Driver-defined sleep locks may be held across calls to this
             function.

       REFERENCES
             SV_ALLOC(D3), SV_BROADCAST(D3), SV_DEALLOC(D3), SV_SIGNAL(D3),
             SV_WAIT(D3), signals(D5)

       NOTICES
          Portability
             All processors

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













                           Copyright 1994 Novell, Inc.               Page 3








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