os_functions: Add OSIsAddressValid

This functions checks whether a virtual address is mapped readable.
This commit is contained in:
Jonathan Neuschäfer 2017-04-24 05:41:14 +02:00
parent 1afc4b899e
commit b289fed3b7
2 changed files with 3 additions and 0 deletions

View File

@ -101,6 +101,7 @@ EXPORT_DECL(void *, MEMDestroyExpHeap, s32 heap);
EXPORT_DECL(void, MEMFreeToExpHeap, s32 heap, void* ptr);
EXPORT_DECL(void *, OSAllocFromSystem, int size, int alignment);
EXPORT_DECL(void, OSFreeToSystem, void *addr);
EXPORT_DECL(int, OSIsAddressValid, void *ptr);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! MCP functions
@ -272,6 +273,7 @@ void InitOSFunctionPointers(void)
OS_FIND_EXPORT(coreinit_handle, MEMFreeToExpHeap);
OS_FIND_EXPORT(coreinit_handle, OSAllocFromSystem);
OS_FIND_EXPORT(coreinit_handle, OSFreeToSystem);
OS_FIND_EXPORT(coreinit_handle, OSIsAddressValid);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! Other function addresses

View File

@ -140,6 +140,7 @@ extern void *(* MEMDestroyExpHeap)(s32 heap);
extern void (* MEMFreeToExpHeap)(s32 heap, void* ptr);
extern void* (* OSAllocFromSystem)(int size, int alignment);
extern void (* OSFreeToSystem)(void *addr);
extern int (* OSIsAddressValid)(void *ptr);
//!----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
//! MCP functions