Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ drv_usecwait(D3) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       drv_usecwait(D3)                                    drv_usecwait(D3)


       NAME
             drv_usecwait - busy-wait for specified interval

       SYNOPSIS
             #include <sys/types.h>
             #include <sys/ddi.h>
             void drv_usecwait(clock_t microsecs);

          Arguments
             microsecs The number of microseconds to busy-wait.

       DESCRIPTION
             drv_usecwait causes the caller to busy-wait for at least the
             number of microseconds specified by microsecs.  The amount of
             time spent busy-waiting may be greater than the time specified
             by microsecs but will not be less.

          Return Values
             None

       USAGE
             drv_usecwait should only be used to wait for short periods of
             time (less than a clock tick) or when it is necessary to wait
             without sleeping (for example, at interrupt level).  When the
             desired delay is at least as long as clock tick and it is
             possible to sleep, the delay(D3) function should be used
             instead since it will not waste processor time busy-waiting as
             drv_usecwait does.

             Because excessive busy-waiting is wasteful the driver should
             only make calls to drv_usecwait as needed, and only for as
             much time as needed.  drv_usecwait does not raise the
             interrupt priority level; if the driver wishes to block
             interrupts for the duration of the wait, it is the driver's
             responsibility to set the priority level before the call and
             restore it to its original value afterward.

          Level
             Initialization, Base or Interrupt.

          Synchronization Constraints
             Does not sleep.

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



                           Copyright 1994 Novell, Inc.               Page 1













      drv_usecwait(D3)                                    drv_usecwait(D3)


         Warnings
            Busy-waiting can increase the preemption latency experienced
            by high priority processes.  Since short and bounded
            preemption latency can be critical in a real time environment,
            drivers intended for use in such an environment should not use
            this interface or should limit the length of the wait to an
            appropriately short length of time.

      REFERENCES
            delay(D3), drv_hztousec(D3), drv_usectohz(D3), itimeout(D3),
            timeout(D3), untimeout(D3)

      NOTICES
         Portability
            All processors

         Applicability
            ddi: 1, 2, 3, 4, 5, 5mp, 6, 6mp, 7, 7mp






























                          Copyright 1994 Novell, Inc.               Page 2








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