1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3
4<head>
5<META http-equiv="Content-Type" content="text/html; charset=windows-1252">
6<META name="GENERATOR" content="Microsoft FrontPage 5.0">
7<META http-equiv="Content-Style-Type" content="text/css">
8<LINK rel="stylesheet" type="text/css" href="../../CSS/revolution.css">
9<title>PPCSync</title>
10</head>
11
12<body>
13
14<h1>PPCSync</h1>
15
16<h2>C Specification</h2>
17
18<dl>
19<dd><pre><code>#include &lt;revolution/base/PPCArch.h&gt;</code></pre>
20  </dd>
21<dd><pre><code>void PPCSync ( void );</code></pre>
22  </dd>
23</dl>
24
25<h2>Arguments</h2>
26
27<p>None.</p>
28
29<h2>Return Values</h2>
30
31<p>None.</p>
32<H2>Description</H2>
33<P>The <code>PPCSync</code> function performs a standard PowerPC <code>sync</code> instruction.&nbsp;However, several special steps are required to use sync in the Revolution. This function encapsulates these steps. </P>
34<P><code>PPCSync</code> disables interrupts, enables address broadcasting, and performs a <code>sync</code> instruction.&nbsp;Interrupts are then restored to their prior state, and address broadcasting is disabled.</P>
35<P>The <CODE>PPCSync</CODE> function flushes all reserved I/O traffic from CPU to main memory. Flushing traffic is required when applications demand that memory be updated appropriately. For example, data is flushed from the cache to main memory for the graphics processor to use.  To confirm that the data was flushed to main memory, you many need to call <CODE>PPCSync</CODE> before the graphics processor accesses the data. (See <a href="../Cache/DCFlushRangeNoSync.html"><code>DCFlushRangeNoSync</code></a> or <a href="../Cache/DCStoreRangeNoSync.html"><code>DCStoreRangeNoSync</code></a>.)</P>
36<P>The DMA transfer between the locked cache is not affected by the <CODE>PPCSync</CODE> function. You should use the locked cache queue operations to ensure that DMA operations have completed.</P>
37<P>Because the <code>PPCSync</code> function can take a significant amount of time, indiscriminate use of this function may adversely affect performance.</P>
38
39
40
41<h2>See Also</h2>
42
43<p><a href="../toc.html#Cache" target="contents">Cache Functions</a>, <br> <code><a href="../Cache/DCFlushRangeNoSync.html">DCFlushRangeNoSync</a>, <a href="../Cache/DCStoreRangeNoSync.html">DCStoreRangeNoSync</a></code></p>
44
45<h2>Revision History</h2>
46<P>03/01/2006 Initial version.</P>
47</body>
48</html>