sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
ps2_osal.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright 2001-2004, ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
15#ifndef __PS2_OSAL_H__
16#define __PS2_OSAL_H__
17
18#include <pthread.h>
19#include <stdio.h>
20#include <stdlib.h>
21#include <stdint.h>
22#include <string.h>
23#include <kernel.h>
24#include <kernel_util.h>
25
26typedef int pte_osThreadHandle;
27typedef int pte_osSemaphoreHandle;
28typedef int pte_osMutexHandle;
29#include <sys/pte_generic_osal.h>
30
31extern pte_osResult pteTlsGlobalInit(int maxEntries);
32extern void * pteTlsThreadInit(void);
33
34extern pte_osResult __pteTlsAlloc(unsigned int *pKey);
35extern void * pteTlsGetValue(void *pTlsThreadStruct, unsigned int index);
36extern pte_osResult __pteTlsSetValue(void *pTlsThreadStruct, unsigned int index, void * value);
37extern void *__getTlsStructFromThread(s32 thid);
38extern pte_osResult pteTlsFree(unsigned int index);
39
40extern void pteTlsThreadDestroy(void * pTlsThreadStruct);
41extern void pteTlsGlobalDestroy(void);
42
44 uint32_t threadNumber;
45 void *tlsPtr;
46};
47
48extern struct OsalThreadInfo __threadInfo[];
49
50#endif /* __PS2_OSAL_H__ */