OS_WaitVBlankIntr

Syntax

#include <nitro/os.h>
void OS_WaitVBlankIntr( void );

Arguments

None.

Return Values

None.

Description

Waits until a V-Blank interrupt is generated. This is different from SVC_WaitVBlankIntr(), since when there is open time, the CPU switches to other threads.

Set the V-Blank check flag with OS_SetIrqCheckFlag( OS_IE_V_BLANK ) in the V-Blank interrupt handler. OS_WaitVBlankIntr() checks whether this flag has be set after IRQ interrupt and whether V-Blank has already occurred.



When Multiple Threads Have the Same V-Blank Interrupt

It's important to be careful when multiple threads call OS_WaitVBlankIntr() at the same time. The reason is that in OS_WaitVBlankIntr(), the first V-Blank's checkflag is cleared. For example, when two threads are waiting for V-Blank with OS_WaitVBlankIntr(), the first thread returned performs a certain operation. Then, when OS_WaitVBlankIntr() is encountered again, the flag is already cleared, so the other thread cannot be returned.

See Also

SVC_WaitVBlankIntr

Revision History

2005/10/07 Initial version.


CONFIDENTIAL