From 948f03758a2f7c959bf9268bb72e82a0de240c92 Mon Sep 17 00:00:00 2001 From: James Benton Date: Thu, 7 Jan 2016 13:20:05 +0000 Subject: [PATCH] Add baseheap functions. --- include/coreinit/baseheap.h | 26 ++++++++++++++++++++++++++ rpl/libcoreinit/exports.h | 5 +++++ 2 files changed, 31 insertions(+) create mode 100644 include/coreinit/baseheap.h diff --git a/include/coreinit/baseheap.h b/include/coreinit/baseheap.h new file mode 100644 index 0000000..ca9d2ea --- /dev/null +++ b/include/coreinit/baseheap.h @@ -0,0 +1,26 @@ +#pragma once +#include + +WUT_LIB_HEADER_START + +typedef uint32_t MEMBaseHeapType; +typedef void *MEMHeapHandle; + +enum MEMBaseHeapType +{ + MEM_BASE_HEAP_MEM1 = 0, + MEM_BASE_HEAP_MEM2 = 1, + MEM_BASE_HEAP_FG = 8, +}; + +MEMBaseHeapType +MEMGetArena(MEMHeapHandle handle); + +MEMHeapHandle +MEMGetBaseHeapHandle(MEMBaseHeapType type); + +MEMHeapHandle +MEMSetBaseHeapHandle(MEMBaseHeapType type, + MEMHeapHandle handle); + +WUT_LIB_HEADER_END diff --git a/rpl/libcoreinit/exports.h b/rpl/libcoreinit/exports.h index 7d96a72..6e88aa5 100644 --- a/rpl/libcoreinit/exports.h +++ b/rpl/libcoreinit/exports.h @@ -25,6 +25,11 @@ EXPORT(OSXorAtomic64); EXPORT(OSTestAndClearAtomic64); EXPORT(OSTestAndSetAtomic64); +// coreinit/baseheap.h +EXPORT(MEMGetArena); +EXPORT(MEMGetBaseHeapHandle); +EXPORT(MEMSetBaseHeapHandle); + // coreinit/cache.h EXPORT(DCInvalidateRange); EXPORT(DCFlushRange);