vitasdk
Documentation of the vitasdk
thread.h
Go to the documentation of this file.
1 
6 #ifndef _PSP2_KERNEL_THREADMGR_THREAD_H_
7 #define _PSP2_KERNEL_THREADMGR_THREAD_H_
8 
9 #include <vitasdk/build_utils.h>
10 #include <psp2/types.h>
11 #include <psp2/kernel/cpu.h>
13 
14 #ifdef __cplusplus
15 extern "C" {
16 #endif
17 
18 
48 SceUID sceKernelCreateThread(const char *name, SceKernelThreadEntry entry, int initPriority,
49  SceSize stackSize, SceUInt attr, int cpuAffinityMask,
50  const SceKernelThreadOptParam *option);
51 
60 
68 int sceKernelStartThread(SceUID thid, SceSize arglen, void *argp);
69 
75 int sceKernelExitThread(int status);
76 
82 int sceKernelExitDeleteThread(int status);
83 
93 int sceKernelWaitThreadEnd(SceUID thid, int *stat, SceUInt *timeout);
94 
104 int sceKernelWaitThreadEndCB(SceUID thid, int *stat, SceUInt *timeout);
105 
117 
129 
139 
155 int sceKernelChangeThreadPriority(SceUID thid, int priority);
156 
163 
171 int sceKernelGetThreadExitStatus(SceUID thid, int *status);
172 
179 
188 
207 
217 
226 
236 
243 
250 
251 typedef struct SceKernelSystemInfo {
254 
255  struct {
259  } cpuInfo[4];
262 
271 
280 
287 void *sceKernelGetThreadTLSAddr(SceUID thid, int key);
288 
294 void *sceKernelGetTLSAddr(int key);
295 
302 
303 
304 #ifdef __cplusplus
305 }
306 #endif
307 
308 #endif /* _PSP2_KERNEL_THREADMGR_THREAD_H_ */
int sceKernelGetThreadRunStatus(SceUID thid, SceKernelThreadRunStatus *status)
Retrive the runtime status of a thread.
int sceKernelGetSystemInfo(SceKernelSystemInfo *info)
Get the system information.
VITASDK_BUILD_ASSERT_EQ(0x48, SceKernelSystemInfo)
SceKernelSysClock idleClock
Definition: thread.h:256
SceUID sceKernelGetProcessId(void)
Get the process ID of in the running thread.
int sceKernelExitDeleteThread(int status)
Exit a thread and delete itself.
int sceKernelExitThread(int status)
Exit a thread.
struct SceKernelSystemInfo::@9 cpuInfo[4]
int sceKernelCheckThreadStack(void)
Check the thread stack?
int sceKernelGetThreadId(void)
Get the current thread Id.
void * sceKernelGetThreadTLSAddr(SceUID thid, int key)
sceKernelGetThreadTLSAddr gets an address to a 4 bytes area of TLS memory for the specified thread
int sceKernelDeleteThread(SceUID thid)
Delate a thread.
SceUID sceKernelCreateThread(const char *name, SceKernelThreadEntry entry, int initPriority, SceSize stackSize, SceUInt attr, int cpuAffinityMask, const SceKernelThreadOptParam *option)
Create a thread.
int sceKernelGetThreadCpuAffinityMask(SceUID thid)
Retrive the cpu affinity mask of a thread.
int sceKernelGetThreadCurrentPriority(void)
Get the current priority of the thread you are in.
int sceKernelChangeCurrentThreadAttr(SceUInt clearAttr, SceUInt setAttr)
Modify the attributes of the current thread.
SceInt64 sceKernelGetSystemTimeWide(void)
Get the system time (wide version)
SceUInt32 threadSwitchCount
Definition: thread.h:258
SceUInt32 comesOutOfIdleCount
Definition: thread.h:257
int sceKernelGetThreadInfo(SceUID thid, SceKernelThreadInfo *info)
Get the status information for the specified thread.
int sceKernelDelayThread(SceUInt delay)
Delay the current thread by a specified number of microseconds.
int sceKernelDelayThreadCB(SceUInt delay)
Delay the current thread by a specified number of microseconds and handle any callbacks.
int sceKernelChangeThreadPriority(SceUID thid, int priority)
Change the threads current priority.
int sceKernelStartThread(SceUID thid, SceSize arglen, void *argp)
Start a created thread.
int sceKernelChangeThreadCpuAffinityMask(SceUID thid, int mask)
Set the cpu affinity mask of a thread.
int sceKernelWaitThreadEndCB(SceUID thid, int *stat, SceUInt *timeout)
Wait until a thread has ended and handle callbacks if necessary.
SceKernelIdListType
Threadmgr types.
Definition: threadmgr.h:16
SceKernelIdListType sceKernelGetThreadmgrUIDClass(SceUID uid)
Get the type of a Threadmgr uid.
int sceKernelWaitThreadEnd(SceUID thid, int *stat, SceUInt *timeout)
Wait until a thread has ended.
SceSize size
Definition: thread.h:252
SceUInt32 activeCpuMask
Definition: thread.h:253
void * sceKernelGetTLSAddr(int key)
sceKernelGetTLSAddr get pointer to TLS key area for current thread
int sceKernelGetThreadExitStatus(SceUID thid, int *status)
Get the exit status of a thread.
int(* SceKernelThreadEntry)(SceSize args, void *argp)
Definition: threadmgr.h:62
int sceKernelGetThreadStackFreeSize(SceUID thid)
Get the free stack size for a thread.
Definition: thread.h:251
Structure to hold the status information for a thread.
Definition: threadmgr.h:81
Additional options used when creating threads.
Definition: threadmgr.h:65
Statistics about a running thread.
Definition: threadmgr.h:52
unsigned int SceSize
Definition: types.h:56
uint32_t SceUInt
Definition: types.h:48
int SceUID
UIDs are used to describe many different kernel objects.
Definition: types.h:90
int64_t SceInt64
Definition: types.h:50
uint32_t SceUInt32
Definition: types.h:45
SceUInt64 SceKernelSysClock
64-bit system clock type.
Definition: types.h:97