PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
xthbase.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
16#ifndef __XTHBASE_H__
17#define __XTHBASE_H__
18
19#include <thbase.h>
20
21#ifdef __cplusplus
22extern "C" {
23#endif
24
25#define TSS_THREAD 0
26#define TSS_DISABLEINTR 3
27#define TSS_NOTHREAD 4
28
29int GetThreadCurrentPriority(void);
30unsigned int GetSystemTimeLow(void);
31int ReferSystemStatus(iop_sys_status_t *info, size_t size);
32int ReferThreadRunStatus(int thid, iop_thread_run_status_t *stat, size_t size);
33int GetThreadStackFreeSize(int thid);
34
35// Type argument for GetThreadmanIdList
36#define TMID_Thread 1
37#define TMID_Semaphore 2
38#define TMID_EventFlag 3
39#define TMID_Mbox 4
40#define TMID_Vpl 5
41#define TMID_Fpl 6
42#define TMID_SleepThread 7
43#define TMID_DelayThread 8
44#define TMID_DormantThread 9
45
46int GetThreadmanIdList(int type, int *readbuf, int readbufsize, int *objectcount);
47
48#define xthbase_IMPORTS_start DECLARE_IMPORT_TABLE(thbase, 1, 1)
49#define xthbase_IMPORTS_end END_IMPORT_TABLE
50
51#define I_GetThreadCurrentPriority DECLARE_IMPORT(42, GetThreadCurrentPriority)
52#define I_GetSystemTimeLow DECLARE_IMPORT(43, GetSystemTimeLow)
53#define I_ReferSystemStatus DECLARE_IMPORT(44, ReferSystemStatus)
54#define I_ReferThreadRunStatus DECLARE_IMPORT(45, ReferThreadRunStatus)
55#define I_GetThreadStackFreeSize DECLARE_IMPORT(46, GetThreadStackFreeSize)
56#define I_GetThreadmanIdList DECLARE_IMPORT(47, GetThreadmanIdList)
57
58#ifdef __cplusplus
59}
60#endif
61
62#endif /* __XTHBASE_H__ */