coreinit/memory.h: add OSMemoryBarrier, __OSZeroProcessMemory, OSGetSharedData (#126)

- add function OSMemoryBarrier
- add function __OSZeroProcessMemory
- add function OSGetSharedData + enum OSSharedDataType
This commit is contained in:
Maschell 2020-05-07 14:31:51 +02:00 committed by GitHub
parent 8e69535604
commit bab17a41c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -14,10 +14,25 @@ extern "C" {
typedef enum OSMemoryType
{
OS_MEM1 = 1,
OS_MEM2 = 2,
OS_MEM1 = 1,
OS_MEM2 = 2,
} OSMemoryType;
typedef enum OSSharedDataType
{
OS_SHAREDDATATYPE_FONT_CHINESE = 0,
OS_SHAREDDATATYPE_FONT_KOREAN = 1,
OS_SHAREDDATATYPE_FONT_STANDARD = 2,
OS_SHAREDDATATYPE_FONT_TAIWANESE = 3,
OS_SHAREDDATATYPE_FONT_MAX = 4
} OSSharedDataType;
BOOL
OSGetSharedData(OSSharedDataType type,
uint32_t unk_r4,
void** outPtr,
uint32_t* outSize);
/**
* Moves chunks of memory around, similarly to memmove. Overlapping source and
* destination regions are supported.
@ -131,6 +146,16 @@ OSGetMemBound(OSMemoryType type,
uint32_t *outAddr,
uint32_t *outSize);
void
OSMemoryBarrier();
/**
* Zeros the memory for a given proccessID.
* Works only inside the ROOT process.
*
**/
void
__OSZeroProcessMemory(uint32_t proccesID);
#ifdef __cplusplus
}
#endif