mirror of
https://github.com/wiiu-env/wut.git
synced 2025-01-06 14:18:15 +01:00
Add memlist functions.
This commit is contained in:
parent
b3da4d60c1
commit
0aa7d4b2c4
62
include/coreinit/memlist.h
Normal file
62
include/coreinit/memlist.h
Normal file
@ -0,0 +1,62 @@
|
||||
#pragma once
|
||||
#include <wut.h>
|
||||
|
||||
WUT_LIB_HEADER_START
|
||||
|
||||
struct MEMMemoryLink
|
||||
{
|
||||
void *prev;
|
||||
void *next;
|
||||
};
|
||||
|
||||
CHECK_OFFSET(MemoryLink, 0x0, prev);
|
||||
CHECK_OFFSET(MemoryLink, 0x4, next);
|
||||
CHECK_SIZE(MemoryLink, 0x8);
|
||||
|
||||
struct MEMMemoryList
|
||||
{
|
||||
void *head;
|
||||
void *tail;
|
||||
uint16_t count;
|
||||
uint16_t offsetToMemoryLink;
|
||||
};
|
||||
CHECK_OFFSET(MEMMemoryList, 0x0, head);
|
||||
CHECK_OFFSET(MEMMemoryList, 0x4, tail);
|
||||
CHECK_OFFSET(MEMMemoryList, 0x8, count);
|
||||
CHECK_OFFSET(MEMMemoryList, 0xa, offsetToMemoryLink);
|
||||
CHECK_SIZE(MEMMemoryList, 0xc);
|
||||
|
||||
void
|
||||
MEMInitList(MEMMemoryList *list,
|
||||
uint16_t offsetToMemoryLink);
|
||||
|
||||
void
|
||||
MEMAppendListObject(MEMMemoryList *list,
|
||||
void *object);
|
||||
|
||||
void
|
||||
MEMPrependListObject(MEMMemoryList *list,
|
||||
void *object);
|
||||
|
||||
void
|
||||
MEMInsertListObject(MEMMemoryList *list,
|
||||
void *before,
|
||||
void *object);
|
||||
|
||||
void
|
||||
MEMRemoveListObject(MEMMemoryList *list,
|
||||
void *object);
|
||||
|
||||
void *
|
||||
MEMGetNextListObject(MEMMemoryList *list,
|
||||
void *object);
|
||||
|
||||
void *
|
||||
MEMGetPrevListObject(MEMMemoryList *list,
|
||||
void *object);
|
||||
|
||||
void *
|
||||
MEMGetNthListObject(MEMMEMMemoryList *list,
|
||||
uint16_t n);
|
||||
|
||||
WUT_LIB_HEADER_END
|
@ -127,6 +127,16 @@ EXPORT(MEMResizeForMBlockFrmHeap);
|
||||
EXPORT(MEMGetAllocatableSizeForFrmHeap);
|
||||
EXPORT(MEMGetAllocatableSizeForFrmHeapEx);
|
||||
|
||||
// coreinit/memlist.h
|
||||
EXPORT(MEMInitList);
|
||||
EXPORT(MEMAppendListObject);
|
||||
EXPORT(MEMPrependListObject);
|
||||
EXPORT(MEMInsertListObject);
|
||||
EXPORT(MEMRemoveListObject);
|
||||
EXPORT(MEMGetNextListObject);
|
||||
EXPORT(MEMGetPrevListObject);
|
||||
EXPORT(MEMGetNthListObject);
|
||||
|
||||
// coreinit/mutex.h
|
||||
EXPORT(OSInitMutex);
|
||||
EXPORT(OSInitMutexEx);
|
||||
|
Loading…
Reference in New Issue
Block a user