Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ASSERT(D3) — UnixWare 2.01

Media Vault

Software Library

Restoration Projects

Artifacts Sought






       ASSERT(D3)                                                ASSERT(D3)


       NAME
             ASSERT - verify assertion

       SYNOPSIS
             #include <sys/debug.h>
             #include <sys/ddi.h>
             void ASSERT(int expression);

          Arguments
             expression
                       Expression to be evaluated.

       DESCRIPTION
             ASSERT is a debugging interface for verifying program
             invariants within code that is compiled with the DEBUG
             compilation option defined.

          Return Values
             If expression evaluates to non-zero, ASSERT returns no value.
             If expression evaluates to zero, ASSERT panics the system.

       USAGE
             expression is a boolean expression that the caller expects to
             evaluate to non-zero (that is, the caller is asserting that
             the expression has a non-zero value).  If expression evaluates
             to non-zero, the ASSERT call has no effect.  If expression
             evaluates to zero, ASSERT causes the system to panic with the
             following message:
             PANIC: assertion failed: expression, file: filename, line: lineno

             where filename is the name of the source file in which the
             failed assertion appears and lineno is the line number of the
             ASSERT call within the file.

             When the DEBUG compilation option is not defined, ASSERT calls
             are not compiled into the code, and therefore have no effect,
             including the fact that expression is not evaluated.

          Level
             Initialization, Base or Interrupt.

          Synchronization Constraints
             Does not sleep.





                           Copyright 1994 Novell, Inc.               Page 1













      ASSERT(D3)                                                ASSERT(D3)


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

      REFERENCES
            cmn_err(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