KallistiOS git master
Independent SDK for the Sega Dreamcast
Loading...
Searching...
No Matches
exec.h
Go to the documentation of this file.
1/* KallistiOS ##version##
2
3 arch/dreamcast/include/arch/exec.h
4 (c)2002 Megan Potter
5
6*/
7
8/** \file arch/exec.h
9 \brief Program execution.
10 \ingroup system_overlays
11
12 This file contains functions that allow you to replace the currently running
13 program with another binary that has already been loaded into memory. Doing
14 so is expected to replace the currently running binary in its entirety, and
15 these functions do not return to the calling function.
16
17 \author Megan Potter
18*/
19
20#ifndef __ARCH_EXEC_H
21#define __ARCH_EXEC_H
22
23#include <sys/cdefs.h>
24__BEGIN_DECLS
25
26/** \defgroup system_overlays Overlays
27 \brief API for loading and executing overlays
28 \ingroup system
29
30 @{
31*/
32
33/** \brief Replace the currently running binary.
34
35 This function will replace the currently running binary with whatever is
36 at the specified address. This function does not return.
37
38 \param image The binary to run (already loaded into RAM).
39 \param length The length of the binary.
40 \param address The address of the binary's starting point.
41*/
42void arch_exec_at(const void *image, uint32 length, uint32 address) __noreturn;
43
44/** \brief Replace the currently running binary at the default address.
45
46 This is a convenience function for arch_exec_at() that assumes that the
47 binary has been set up with its starting point at the standard location.
48 In the case of the Dreamcast, this is 0xAC010000 (or 0x8C010000, in P1).
49
50 \param image The binary to run (already loaded into RAM).
51 \param length The length of the binary.
52*/
53void arch_exec(const void *image, uint32 length) __noreturn;
54
55/** @} */
56
57__END_DECLS
58
59#endif /* __ARCH_EXEC_H */
60
#define __noreturn
Identify a function that will never return.
Definition cdefs.h:45
void arch_exec(const void *image, uint32 length) __noreturn
Replace the currently running binary at the default address.
void arch_exec_at(const void *image, uint32 length, uint32 address) __noreturn
Replace the currently running binary.
unsigned long uint32
32-bit unsigned integer
Definition types.h:33