KallistiOS  ##version##
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Functions
exec.h File Reference

Program execution. More...

#include <sys/cdefs.h>

Go to the source code of this file.

Functions

void arch_exec_at (const void *image, uint32 length, uint32 address) __noreturn
 Replace the currently running binary. More...
 
void arch_exec (const void *image, uint32 length) __noreturn
 Replace the currently running binary at the default address. More...
 

Detailed Description

Program execution.

This file contains functions that allow you to replace the currently running program with another binary that has already been loaded into memory. Doing so is expected to replace the currently running binary in its entirety, and these functions do not return to the calling function.

Author
Dan Potter

Function Documentation

void arch_exec ( const void *  image,
uint32  length 
)

Replace the currently running binary at the default address.

This is a convenience function for arch_exec_at() that assumes that the binary has been set up with its starting point at the standard location. In the case of the Dreamcast, this is 0xAC010000 (or 0x8C010000, in P1).

Parameters
imageThe binary to run (already loaded into RAM).
lengthThe length of the binary.
void arch_exec_at ( const void *  image,
uint32  length,
uint32  address 
)

Replace the currently running binary.

This function will replace the currently running binary with whatever is at the specified address. This function does not return.

Parameters
imageThe binary to run (already loaded into RAM).
lengthThe length of the binary.
addressThe address of the binary's starting point.