From d7786dfd643d3f7d6327b1b9cea11e0dc46e1e5e Mon Sep 17 00:00:00 2001 From: Jaylon Gowie Date: Tue, 19 Apr 2022 20:52:30 -0500 Subject: [PATCH] Add SceKernelMemBlockType Typedef --- include/psp2/kernel/sysmem.h | 4 ++-- include/psp2common/kernel/sysmem.h | 1 + include/psp2kern/kernel/sysmem.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/psp2/kernel/sysmem.h b/include/psp2/kernel/sysmem.h index 74d799162..18b740106 100644 --- a/include/psp2/kernel/sysmem.h +++ b/include/psp2/kernel/sysmem.h @@ -46,7 +46,7 @@ typedef struct SceKernelMemBlockInfo { SceSize mappedSize; int memoryType; SceUInt32 access; - SceUInt32 type; + SceKernelMemBlockType type; } SceKernelMemBlockInfo; typedef enum SceKernelMemoryAccessType { @@ -70,7 +70,7 @@ typedef enum SceKernelMemoryType { * * @return SceUID of the memory block on success, < 0 on error. */ -SceUID sceKernelAllocMemBlock(const char *name, SceUInt32 type, SceSize size, SceKernelAllocMemBlockOpt *opt); +SceUID sceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, SceSize size, SceKernelAllocMemBlockOpt *opt); /** * Frees new memory block diff --git a/include/psp2common/kernel/sysmem.h b/include/psp2common/kernel/sysmem.h index 8cb6d98eb..4de1ffa96 100644 --- a/include/psp2common/kernel/sysmem.h +++ b/include/psp2common/kernel/sysmem.h @@ -12,6 +12,7 @@ extern "C" { #endif +typedef SceUInt32 SceKernelMemBlockType; /* * User/Kernel shared memtypes diff --git a/include/psp2kern/kernel/sysmem.h b/include/psp2kern/kernel/sysmem.h index 4c522e382..8ce33ed26 100644 --- a/include/psp2kern/kernel/sysmem.h +++ b/include/psp2kern/kernel/sysmem.h @@ -82,7 +82,7 @@ typedef enum SceKernelModel { * * @return SceUID of the memory block on success, < 0 on error. */ -SceUID ksceKernelAllocMemBlock(const char *name, SceUInt32 type, SceSize size, SceKernelAllocMemBlockKernelOpt *opt); +SceUID ksceKernelAllocMemBlock(const char *name, SceKernelMemBlockType type, SceSize size, SceKernelAllocMemBlockKernelOpt *opt); /** * Frees new memory block @@ -142,7 +142,7 @@ SceUID ksceKernelFindMemBlockByAddrForPid(SceUID pid, const void *addr, SceSize * * @return 0 on success, < 0 on error. */ -int ksceKernelRemapBlock(SceUID uid, SceUInt32 type); +int ksceKernelRemapBlock(SceUID uid, SceKernelMemBlockType type); int ksceKernelMapBlockUserVisible(SceUID uid);