From 7118ccb573e2836b1b1ea2bbb6d1c88a51398d6c Mon Sep 17 00:00:00 2001 From: Reiko Asakura Date: Thu, 11 Mar 2021 15:40:51 -0500 Subject: Move threadmgr functions to common header sceKernelGetTLSAddr has been removed for kernel because it does not exist. --- include/common/kernel/threadmgr.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'include/common') diff --git a/include/common/kernel/threadmgr.h b/include/common/kernel/threadmgr.h index e7e8fb2..86255e8 100644 --- a/include/common/kernel/threadmgr.h +++ b/include/common/kernel/threadmgr.h @@ -20,6 +20,27 @@ typedef struct _SceKernelThreadOptParamInternal { SceInt32 unk0x1C; } SceKernelThreadOptParamInternal; +typedef enum _SceKernelTLS { + SCE_THREAD_TLS_UNK_0, + SCE_THREAD_TLS_ID, + SCE_THREAD_TLS_STACK_START_ADDRESS, + SCE_THREAD_TLS_STACK_END_ADDRESS, + SCE_THREAD_TLS_VFP_EXCEPTION, + SCE_THREAD_TLS_LWMUTEX_STATUS, + SCE_THREAD_TLS_UNK_6, + SCE_THREAD_TLS_UNK_7, + SCE_THREAD_TLS_PRIORITY, + SCE_THREAD_TLS_AFFINITY, +} SceKernelTLS; + +/** + * @brief sceKernelGetThreadTLSAddr gets an address to a 4 bytes area of TLS memory for the specified thread + * @param thid - The UID of the thread to access TLS + * @param key - the TLS keyslot index + * @return pointer to TLS memory + */ +void *sceKernelGetThreadTLSAddr(SceUID thid, SceKernelTLS key); + SCE_CDECL_END #endif -- cgit v1.2.3