GXSetCurrentGXThread

Syntax

#include <revolution/gx.h>

OSThread* GXSetCurrentGXThread ( void );

Arguments

None.

Return Values

The previous GX thread.

Description

This function will set the current GX thread to the calling thread. The current thread should be the thread responsible for generating graphics data.

By default, the GX thread is the thread that invokes the GXInit function. However, it may be changed by calling the GXSetCurrentGXThread function.

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. This indicates that you have two threads about to generate GX data. An assertion failure will occur in this case.

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. The low watermark interrupt handler will resume the thread.

See Also

GXInit, GXGetCurrentGXThread

Revision History

2006/03/01 Initial version.


CONFIDENTIAL