1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//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>GXSetCurrentGXThread</title>
10</head>
11
12<body>
13
14<h1 align="left">GXSetCurrentGXThread</h1>
15
16<h2>Syntax</h2>
17<dl><dd><pre class="construction">
18#include &lt;revolution/gx.h&gt;
19
20OSThread* GXSetCurrentGXThread ( void );
21</pre></dd></dl>
22
23<h2>Arguments</h2>
24<p>None.</p>
25
26<h2>Return Values</h2>
27<p>The previous GX thread.</p>
28
29<H2>Description</H2>
30<P>This function will set the current GX thread to the calling thread.&nbsp;The current thread should be the thread responsible for generating graphics data.</P>
31<P>By default, the GX thread is the thread that invokes the <A href="../Management/GXInit.html"><CODE>GXInit</CODE></A> function. However, it may be changed by calling the <A href="GXSetCurrentGXThread.html"><CODE>GXSetCurrentGXThread</CODE></A> function.</P>
32<P>Be aware that you will create a programming error if you change a GX thread while the current GX thread is suspended by a high watermark interrupt.&nbsp;This indicates that you have two threads about to generate GX data.&nbsp;An assertion failure will occur in this case.</P>
33<P>When graphics data is generated in immediate mode (that is, the CPU FIFO = GP FIFO, and the GP is actively consuming data), the high watermark may be triggered. When this happens, the high watermark interrupt handler will suspend the GX thread, preventing further graphics data from being generated.&nbsp;The low watermark interrupt handler will resume the thread.</P>
34
35<h2>See Also</h2>
36<P class="reference">
37<a href="../Management/GXInit.html">GXInit</a>,
38<a href="GXGetCurrentGXThread.html">GXGetCurrentGXThread</a>
39</p>
40
41<h2>Revision History</h2>
42<P>
432006/03/01 Initial version.</P>
44
45<hr><p>CONFIDENTIAL</p></body>
46</html>