- Inside Macintosh: Processes
- Chapter 4 - Vertical Retrace Manager / About the Vertical Retrace Manager
VBL Tasks Installed by the Operating System
The Operating System uses the Vertical Retrace Manager to accomplish a number of repetitive tasks at uniform intervals. These are some of the VBL tasks installed by the Operating System, grouped by the intervals at which they execute:
- Every interrupt
- Update the value of the global variable
Ticks, which a program may access through the routine TickCount.
- Call the "stack sniffer" to see if the current application's stack and heap have collided. If so, the task calls the System Error Handler.
- Update the position of the cursor.
- Every 30 interrupts
- Check whether the user has inserted a disk or mounted a volume. If so, the task posts a disk-inserted event.
- Every 32 interrupts
- Check whether a keyboard has been reattached after having been detached. If so, the task resets the keyboard.
Some VBL routines may execute only on certain computers or only in certain versions of system software. For example, on early Macintosh computers, a VBL task checks every other interrupt to determine whether the state of the mouse button has changed from its previous state and then remained unchanged for at least four interrupts. If so, that task posts a mouse-down or mouse-up event, as appropriate. In Macintosh computers equipped with Apple Desktop Bus mouse devices, the Operating System uses a different mechanism for posting mouse-down and mouse-up events.
- Note
- VBL tasks installed by the Operating System are not maintained in the same queue used for application-defined VBL tasks. ·
© Apple Computer, Inc.
17 JUN 1996