12#ifndef PSPTHREADMANKERNEL_H
13#define PSPTHREADMANKERNEL_H
197#if defined(_PSP_FW_VERSION) && _PSP_FW_VERSION >= 200
int(* SceKernelThreadEntry)(SceSize args, void *argp)
Definition pspthreadman.h:71
void * sceKernelGetKTLS(int id)
Get the KTLS of the current thread.
int sceKernelCheckThreadKernelStack(void)
Check the thread kernel stack.
void * sceKernelGetThreadKTLS(int id, SceUID thid, int mode)
Get the KTLS of a thread.
int sceKernelIsUserModeThread(void)
Checks if the current thread is a usermode thread.
int sceKernelFreeKTLS(int id)
Free the KTLS allocator.
unsigned int sceKernelGetSystemStatusFlag(void)
Get the system status flag.
int sceKernelGetUserLevel(void)
Get the user level of the current thread.
struct SceKernelThreadKInfo SceKernelThreadKInfo
Structure to hold the status information for a thread (kernel form) 1.5 form.
int ThreadManForKernel_2D69D086(SceUID uid, SceKernelThreadKInfo *info)
Refer kernel version of thread information.
int sceKernelExtendKernelStack(int type, void(*cb)(void *), void *arg)
Extend the kernel thread stack.
int sceKernelAllocateKTLS(int id, int(*cb)(unsigned int *size, void *arg), void *arg)
Setup the KTLS allocator.
unsigned int sceKernelGetSyscallRA(void)
Get the return address of the current thread's syscall.
int sceKernelSuspendAllUserThreads(void)
Suspend all user mode threads in the system.
int sceKernelGetThreadKernelStackFreeSize(SceUID thid)
Get the free stack space on the kernel thread.
unsigned int SceUInt
Definition pspkerneltypes.h:31
int SceUID
UIDs are used to describe many different kernel objects.
Definition pspkerneltypes.h:24
unsigned int SceSize
Definition psptypes.h:103
64-bit system clock type.
Definition pspthreadman.h:39
Structure to hold the status information for a thread (kernel form) 1.5 form.
Definition pspthreadman_kernel.h:160
SceUID waitId
Wait id.
Definition pspthreadman_kernel.h:192
SceSize args
Size of args.
Definition pspthreadman_kernel.h:182
float * vfpuContext
VFPU Context.
Definition pspthreadman_kernel.h:209
void * gpReg
Pointer to the gp.
Definition pspthreadman_kernel.h:180
struct SceSCContext * scContext
Syscall Context.
Definition pspthreadman_kernel.h:215
int status
Thread status.
Definition pspthreadman_kernel.h:168
void * kstackSize
Kernel stack size.
Definition pspthreadman_kernel.h:178
int initPriority
Initial priority.
Definition pspthreadman_kernel.h:186
void * kstack
Kernel stack pointer.
Definition pspthreadman_kernel.h:176
SceUInt releaseCount
Release count.
Definition pspthreadman_kernel.h:205
void * argp
Pointer to args.
Definition pspthreadman_kernel.h:184
struct SceThreadContext * thContext
Thread Context.
Definition pspthreadman_kernel.h:207
int wakeupCount
Wakeup count.
Definition pspthreadman_kernel.h:194
SceUInt threadPreemptCount
Thread preemption count.
Definition pspthreadman_kernel.h:203
void * retAddr
Return address from syscall.
Definition pspthreadman_kernel.h:211
int waitType
Wait type.
Definition pspthreadman_kernel.h:190
char name[32]
Nul terminated name of the thread.
Definition pspthreadman_kernel.h:164
SceSize size
Size of the structure.
Definition pspthreadman_kernel.h:162
void * stack
Thread stack pointer.
Definition pspthreadman_kernel.h:172
int stackSize
Thread stack size.
Definition pspthreadman_kernel.h:174
SceUInt attr
Thread attributes.
Definition pspthreadman_kernel.h:166
SceKernelSysClock runClocks
Number of clock cycles run.
Definition pspthreadman_kernel.h:196
SceUInt unknown1
Unknown, possibly size of SC context.
Definition pspthreadman_kernel.h:213
SceUInt intrPreemptCount
Interrupt preemption count.
Definition pspthreadman_kernel.h:201
SceKernelThreadEntry entry
Thread entry point.
Definition pspthreadman_kernel.h:170
int currentPriority
Current priority.
Definition pspthreadman_kernel.h:188
Definition pspthreadman_kernel.h:148
unsigned int k1
Definition pspthreadman_kernel.h:153
unsigned int ra
Definition pspthreadman_kernel.h:152
unsigned int epc
Definition pspthreadman_kernel.h:150
unsigned int unk[3]
Definition pspthreadman_kernel.h:154
unsigned int sp
Definition pspthreadman_kernel.h:151
unsigned int status
Definition pspthreadman_kernel.h:149
Thread context Structues for the thread context taken from florinsasu's post on the forums.
Definition pspthreadman_kernel.h:134
unsigned int type
Definition pspthreadman_kernel.h:135
unsigned int fpr[32]
Definition pspthreadman_kernel.h:137
unsigned int fc31
Definition pspthreadman_kernel.h:138
unsigned int SR
Definition pspthreadman_kernel.h:141
unsigned int field_118
Definition pspthreadman_kernel.h:144
unsigned int field_114
Definition pspthreadman_kernel.h:143
unsigned int gpr[31]
Definition pspthreadman_kernel.h:136
unsigned int hi
Definition pspthreadman_kernel.h:139
unsigned int EPC
Definition pspthreadman_kernel.h:142
unsigned int lo
Definition pspthreadman_kernel.h:140