From 3c763b7a082c95976039b1b644eb06bc3e75ef9d Mon Sep 17 00:00:00 2001 From: James Benton Date: Wed, 30 May 2018 13:10:57 +0100 Subject: [PATCH] coreinit: Add OSDynLoad_{Get,Set}TLSAllocator. --- cafe/coreinit/exports.def | 6 ++++-- include/coreinit/dynload.h | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/cafe/coreinit/exports.def b/cafe/coreinit/exports.def index df52acc..94ea769 100644 --- a/cafe/coreinit/exports.def +++ b/cafe/coreinit/exports.def @@ -93,11 +93,13 @@ OSGetUPID DisassemblePPCRange // coreinit/dynload.h -OSDynLoad_SetAllocator -OSDynLoad_GetAllocator OSDynLoad_Acquire OSDynLoad_FindExport OSDynLoad_Release +OSDynLoad_SetAllocator +OSDynLoad_GetAllocator +OSDynLoad_SetTLSAllocator +OSDynLoad_GetTLSAllocator // coreinit/event.h OSInitEvent diff --git a/include/coreinit/dynload.h b/include/coreinit/dynload.h index 61c5373..b25c414 100644 --- a/include/coreinit/dynload.h +++ b/include/coreinit/dynload.h @@ -81,6 +81,22 @@ OSDynLoad_Error OSDynLoad_GetAllocator(OSDynLoadAllocFn *outAllocFn, OSDynLoadFreeFn *outFreeFn); + +/** + * Set the allocator functions to use for thread local storage. + */ +OSDynLoad_Error +OSDynLoad_SetTLSAllocator(OSDynLoadAllocFn allocFn, + OSDynLoadFreeFn freeFn); + + +/** + * Get the allocator functions used for thread local storage. + */ +OSDynLoad_Error +OSDynLoad_GetTLSAllocator(OSDynLoadAllocFn *outAllocFn, + OSDynLoadFreeFn *outFreeFn); + #ifdef __cplusplus } #endif