mirror of
https://github.com/wiiu-env/wut.git
synced 2024-12-04 19:44:16 +01:00
coreinit: Use rplwrap for exit (__rplwrap_exit)
This commit is contained in:
parent
4278819a01
commit
f92657e8b5
@ -1210,7 +1210,6 @@ bspQuery
|
||||
bspRead
|
||||
bspShutdown
|
||||
bspWrite
|
||||
exit
|
||||
//memclr
|
||||
//memcpy
|
||||
//memmove
|
||||
@ -1229,6 +1228,9 @@ smdSimpleBufFree
|
||||
smdSimpleBufGetStatistics
|
||||
smdSimpleBufPoolCreate
|
||||
|
||||
:TEXT_WRAP
|
||||
exit
|
||||
|
||||
:DATA
|
||||
MEMAllocFromDefaultHeap
|
||||
MEMAllocFromDefaultHeapEx
|
||||
|
@ -12,7 +12,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
void
|
||||
exit(int code);
|
||||
RPLWRAP(exit)(int code);
|
||||
|
||||
void
|
||||
_Exit(int code);
|
||||
|
@ -8,3 +8,4 @@
|
||||
|
||||
#include "wut_structsize.h"
|
||||
#include "wut_types.h"
|
||||
#include "wut_rplwrap.h"
|
||||
|
3
include/wut_rplwrap.h
Normal file
3
include/wut_rplwrap.h
Normal file
@ -0,0 +1,3 @@
|
||||
#pragma once
|
||||
|
||||
#define RPLWRAP(func) __rplwrap_##func
|
@ -1,9 +1,6 @@
|
||||
#include "wut_newlib.h"
|
||||
#include <coreinit/exit.h>
|
||||
|
||||
// Forward newlib _exit to the coreinit.rpl _Exit
|
||||
extern void _Exit(int status);
|
||||
|
||||
static void
|
||||
__init_wut_syscall_array()
|
||||
{
|
||||
@ -14,7 +11,8 @@ __init_wut_syscall_array()
|
||||
__syscalls.lock_release = __wut_lock_release;
|
||||
//__syscalls.malloc_lock = __wut_malloc_lock;
|
||||
//__syscalls.malloc_unlock = __wut_malloc_unlock;
|
||||
__syscalls.exit = _Exit;
|
||||
//use coreinit's exit function
|
||||
__syscalls.exit = RPLWRAP(exit);
|
||||
__syscalls.gettod_r = __wut_gettod_r;
|
||||
__syscalls.clock_gettime = __wut_clock_gettime;
|
||||
__syscalls.clock_settime = __wut_clock_settime;
|
||||
|
Loading…
Reference in New Issue
Block a user