1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<HTML> 3<HEAD> 4<META http-equiv="Content-Type" content="text/html; charset=windows-1252"> 5<META name="GENERATOR" content="IBM WebSphere Studio Homepage Builder Version 7.0.0.0 for Windows"> 6<META http-equiv="Content-Style-Type" content="text/css"> 7<TITLE>SVC_WaitVBlankIntr</TITLE> 8<LINK rel="stylesheet" href="../css/nitro.css" type="text/css"> 9</HEAD> 10<BODY> 11<H1 align="left">SVC_WaitVBlankIntr <IMG src="../image/NTR.gif" align="middle"><IMG src="../image/TWL.gif" align="middle"></H1> 12<H2>Syntax</H2> 13<DL> 14 <DD> 15 <PRE><CODE>#include <nitro/os/common/systemCall.h></CODE></PRE> 16 <PRE><CODE>void SVC_WaitVBlankIntr( void );</CODE></PRE> 17</DL> 18<H2>Arguments</H2> 19<P>None.</P> 20<H2>Return Values</H2> 21<P>None.</P> 22<H2>Description</H2> 23<P>Waits until a V-Blank interrupt is generated.</P> 24<P>In order to allow the CPU <FONT color="red">to switch to another thread</FONT> when it becomes available, all occurrences of <CODE>SVC_WaitVBlankIntr</CODE> will be replaced by calls to the <A href="../os/system/OS_WaitVBlankIntr.html"><CODE>OS_WaitVBlankIntr</CODE></A> function. As a result, although system calls are not normally used, system calls may be made without being replaced when the environment variable <CODE>NITRO_SVC_WAITVBLANK_COMPATIBLE</CODE> has been set.</P> 25 26<H3>Using System Calls</H3> 27<P> 28Continues to wait in a <code>Halt</code> state until a V-Blank interrupt is generated. In other words, the CPU <FONT color="red">does not switch to another thread</FONT> even if there is available time. If you want to switch to another thread when the CPU is available, use <A href="../os/system/OS_WaitVBlankIntr.html"><CODE>OS_WaitVBlankIntr()</A></CODE>. 29</P> 30<P> 31Set the V-Blank check flag with <code><a href="../os/irq/OS_SetIrqCheckFlag.html">OS_SetIrqCheckFlag</a>( OS_IE_V_BLANK )</code> 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. 32</P> 33<P> 34When multiple threads are used at the same time, the overhead for the system call can be reduced in comparison to repeatedly calling <code><a href="../os/system/OS_Halt.html">OS_Halt()</a></code>. 35</P> 36<P> 37If 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. 38</P> 39 40<H2>See Also</H2> 41<P><CODE><A href="../os/irq/OS_SetIrqCheckFlag.html">OS_SetIrqCheckFlag</A>, <A href="../os/system/OS_Halt.html">OS_Halt</A><BR> <A href="../os/system/OS_WaitVBlankIntr.html">OS_WaitVBlankIntr</A></CODE></P> 42<H2>Revision History</H2> 43<P> 442005/11/21 Added a description that replaced the <CODE>OS_WaitVBlankIntr</CODE> function call.<BR> 2005/10/07 Added a note that one cannot switch to other threads. <BR>2004/11/02 Deleted the description of <CODE>SVC_WaitIntr()</CODE>.<BR> 2004/04/22 Added a note regarding use with multiple threads.<BR> 2004/01/18 Initial version. 45</P> 46<hr><p>CONFIDENTIAL</p></body> 47</HTML>