pspsdk-1.0+beta2
Main Page
Modules
Data Structures
Files
File List
Globals
pspthreadman_kernel.h
Go to the documentation of this file.
1
/*
2
* PSP Software Development Kit - http://www.pspdev.org
3
* -----------------------------------------------------------------------
4
* Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5
*
6
* pspthreadman_kernel.h - Interface to the kernel side of threadman
7
*
8
* Copyright (c) 2005 James F.
9
*
10
* $Id: pspthreadman_kernel.h 2131 2007-01-15 21:42:22Z tyranid $
11
*/
12
13
#ifndef PSPTHREADMANKERNEL_H
14
#define PSPTHREADMANKERNEL_H
15
16
#include <
pspkerneltypes.h
>
17
#include <
pspthreadman.h
>
18
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
35
int
sceKernelSuspendAllUserThreads
(
void
);
36
42
int
sceKernelIsUserModeThread
(
void
);
43
49
int
sceKernelGetUserLevel
(
void
);
50
56
unsigned
int
sceKernelGetSyscallRA
(
void
);
57
65
int
sceKernelGetThreadKernelStackFreeSize
(
SceUID
thid);
66
72
int
sceKernelCheckThreadKernelStack
(
void
);
73
83
int
sceKernelExtendKernelStack
(
int
type
,
void
(*cb)(
void
*),
void
*arg);
84
90
unsigned
int
sceKernelGetSystemStatusFlag
(
void
);
91
101
int
sceKernelAllocateKTLS
(
int
id
,
int
(*cb)(
unsigned
int
*
size
,
void
*arg),
void
*arg);
102
110
int
sceKernelFreeKTLS
(
int
id
);
111
119
void
*
sceKernelGetKTLS
(
int
id
);
120
130
void
*
sceKernelGetThreadKTLS
(
int
id
,
SceUID
thid,
int
mode);
131
134
struct
SceThreadContext
{
135
unsigned
int
type
;
136
unsigned
int
gpr
[31];
137
unsigned
int
fpr
[32];
138
unsigned
int
fc31
;
139
unsigned
int
hi
;
140
unsigned
int
lo
;
141
unsigned
int
SR
;
142
unsigned
int
EPC
;
143
unsigned
int
field_114
;
144
unsigned
int
field_118
;
145
};
146
147
struct
SceSCContext
148
{
149
unsigned
int
status
;
150
unsigned
int
epc
;
151
unsigned
int
sp
;
152
unsigned
int
ra
;
153
unsigned
int
k1
;
154
unsigned
int
unk
[3];
155
};
156
160
typedef
struct
SceKernelThreadKInfo
{
162
SceSize
size
;
164
char
name
[32];
166
SceUInt
attr
;
168
int
status
;
170
SceKernelThreadEntry
entry
;
172
void
*
stack
;
174
int
stackSize
;
176
void
*
kstack
;
178
void
*
kstackSize
;
180
void
*
gpReg
;
182
SceSize
args
;
184
void
*
argp
;
186
int
initPriority
;
188
int
currentPriority
;
190
int
waitType
;
192
SceUID
waitId
;
194
int
wakeupCount
;
196
SceKernelSysClock
runClocks
;
197
#if _PSP_FW_VERSION >= 200
198
SceUInt
unk3;
/* Unknown extra field on later firmwares */
199
#endif
200
201
SceUInt
intrPreemptCount
;
203
SceUInt
threadPreemptCount
;
205
SceUInt
releaseCount
;
207
struct
SceThreadContext
*
thContext
;
209
float
*
vfpuContext
;
211
void
*
retAddr
;
213
SceUInt
unknown1
;
215
struct
SceSCContext
*
scContext
;
216
}
SceKernelThreadKInfo
;
217
226
int
ThreadManForKernel_2D69D086
(
SceUID
uid,
SceKernelThreadKInfo
*info);
227
228
#ifdef __cplusplus
229
}
230
#endif
231
234
#endif
/* PSPTHREADMANKERNEL_H */
src
kernel
pspthreadman_kernel.h
Generated on Sat Apr 9 2016 07:00:25 for pspsdk-1.0+beta2 by
1.8.1.2