From 88cdd94339cc0307dac9f2a9e30465d6f4c203d2 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 16 Sep 2020 19:04:12 -0400 Subject: Added inferred inline functions ArrayInsert and ArrayCheckGrow --- src/SDK/OS/OSAlloc.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/SDK/OS/OSAlloc.c') diff --git a/src/SDK/OS/OSAlloc.c b/src/SDK/OS/OSAlloc.c index c553d8d..f0ff04d 100644 --- a/src/SDK/OS/OSAlloc.c +++ b/src/SDK/OS/OSAlloc.c @@ -2,7 +2,7 @@ #include "consts.h" #include "OS/OSAlloc.h" -inline Cell* DLAddFront(Cell* list, Cell* cell) +static inline Cell* DLAddFront(Cell* list, Cell* cell) { cell->next = list; cell->prev = NULL; @@ -12,7 +12,7 @@ inline Cell* DLAddFront(Cell* list, Cell* cell) return cell; } -inline Cell* DLExtract(Cell* list, Cell* cell) +static inline Cell* DLExtract(Cell* list, Cell* cell) { if (cell->next) { cell->next->prev = cell->prev; @@ -72,12 +72,13 @@ Cell *DLInsert(Cell *original, Cell *inserted) return inserted; } -extern HeapDesc *HeapArray; +extern HeapDesc *HeapArray; #define HEADERSIZE OSi_ROUND(sizeof(Cell), 32) #define MINOBJSIZE (HEADERSIZE+32) -void* OSAllocFromHeap(OSHeapHandle heap, u32 size) { +void* OSAllocFromHeap(OSHeapHandle heap, u32 size) +{ HeapDesc* hd; Cell* cell; Cell* newCell; @@ -126,7 +127,8 @@ void* OSAllocFromHeap(OSHeapHandle heap, u32 size) { return (void *)((char *)cell + HEADERSIZE); } -void OSFreeToHeap(OSHeapHandle heap, void* ptr) { +void OSFreeToHeap(OSHeapHandle heap, void* ptr) +{ OSHeapInfo *heapInfo; HeapDesc *hd; Cell *cell; -- cgit v1.2.3