[Contents] [Index] [Help] [Retrace] [Browse <] [Browse >]

As mentioned in the "Exec Tasks" chapter, it is sometimes necessary to
disable interrupts when examining or modifying certain shared system data
structures.  However, for proper system operation, interrupts should never
be disabled unless absolutely necessary, and never for more than 250
microseconds.  Interrupt disabling is controlled with the Disable() and
Enable() functions. Although assembler DISABLE and ENABLE macros are
provided, we strongly suggest that you use the system functions rather
than the macros for upwards compatibility and smaller code size.

In some system code, there are nested disabled sections.  Such code
requires that interrupts be disabled with the first Disable() and not
re-enabled until the last Enable().  The system Enable() and Disable()
functions are designed to permit this sort of nesting.

Disable() increments a counter to track how many levels of disable have
been issued.  Only 126 levels of nesting are permitted. Enable()
decrements the counter, and reenables interrupts when the last disable
level has been exited.

[Back to Amiga Developer Docs]