Important: The information in this document is obsolete and should not be used for new development.
Vertical Retrace QueuesThe Vertical Retrace Manager stores application-defined VBL task records in vertical retrace queues, which are standard operating-system queues. If multiple tasks in the same vertical retrace queue are scheduled to be executed during the same interrupt, the Vertical Retrace Manager will execute the tasks in the order they were installed in the queue.
Compact Macintosh computers maintain only one vertical retrace queue, because these computers have only one screen. However, computers with multiple screens require multiple vertical retrace queues. Because slot-based task installation and removal routines apply to just one slot, the Vertical Retrace Manager maintains a separate vertical retrace queue for each slot that contains a video card. In addition, to maintain compatibility with the system-based VBL task installation and removal routines, the Vertical Retrace Manager maintains a single, system-based vertical retrace queue for all applications to share.
Ordinarily, you do not need to inspect or manipulate the contents of vertical retrace queues directly. Instead, you can use the Vertical Retrace Manager routines for installing task records in and removing them from vertical retrace queues.
In one case, however, you might need to inspect the header of a vertical retrace queue. If you need to know whether some code is being called in response to a VBL interrupt, you can inspect the
qFlagsfield of the queue header. The Vertical Retrace Manager sets bit 6 of the
qFlagsfield in the queue header to indicate that a VBL task in the queue is being executed.
- Assembly-Language Note
- You can use the global constant
inVBLto test this bit. ·