SVC_WaitVBlankIntr

C Specification

#include <nitro/os/common/systemCall.h>
void SVC_WaitVBlankIntr( void );

Arguments

None.

Return Values

None.

Description

Waits until a V-Blank interrupt is generated. In order to allow the CPU to switch to other threads during available times, the OS_WaitVBlankIntr function is called when SVC_WaitVBlankIntr is called. Although system calls are not normally used, system calls may be made when the environment variable NITRO_SVC_WAITVBLANK_COMPATIBLE has been set.

Using System Calls

Continues to wait in a Halt state until a V-Blank interrupt is generated. In other words, the CPU does not switch to another thread even if there is available time. If you want to switch to another thread when the CPU is available, use OS_WaitVBlankIntr().

Set the V-Blank check flag with OS_SetIrqCheckFlag( OS_IE_V_BLANK ) in the V-Blank interrupt handler. SVC_WaitVBlankIntr() assumes that V-Blank has occurred based on the fact this flag has been set after the IRQ interrupt internal to this function.

When multiple threads are used at the same time, the overhead for system calls can be reduced in comparison to repeatedly calling OS_Halt().

If this function is called for the same interrupt at the same time for multiple threads, be aware that only one thread can be restored for each corresponding V-Blank.

See Also

OS_SetIrqCheckFlag, OS_Halt
OS_WaitVBlankIntr

Revision History

11/21/2005 Added a description that replaced the OS_WaitVBlankIntr function call.
10/07/2005 Added a note that one cannot switch to other threads.
11/02/2004 Deleted the description of SVC_WaitIntr().
04/22/2004 Added a note regarding use with multiple threads.
01/18/2004 Initial version.