SVC_WaitVBlankIntr

Syntax

#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 another thread when it becomes available, all occurrences of SVC_WaitVBlankIntr will be replaced by calls to the OS_WaitVBlankIntr function. As a result, although system calls are not normally used, system calls may be made without being replaced 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 the system call 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

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


CONFIDENTIAL