OSRestart

Syntax

#include <revolution/os.h>

void OSRestart(u32 resetCode);

Arguments

resetCode Only the low-order 29 bits are valid. Any value freely specified here ahead of time can be retrieved after restart using the OSGetResetCode function. If OSRestart is called and a game disc cannot be found or the current game differs from the current disc, make sure that a reset code of 0 is always passed to the next game at run-time.

Return Values

None.

Description

The OSRestart function executes a restart. "Restart" means that the function reloads the application and jumps to the start of the application.

You must be aware of the cautions indicated in the Reset and Shutdown Functions when calling this function.

Note: There is no guarantee that any data in memory will remain after a restart. Data loss in a specified region can be avoided by using the OSSetSaveRegion function.

See Also

Reset and Shutdown Functions, OSGetResetCode, OSSetSaveRegion

Revision History

2006/10/25 Revised explanation.
2006/08/10 Initial version.


CONFIDENTIAL