vitasdk
Documentation of the vitasdk
threadmgr.h
Go to the documentation of this file.
1
6#ifndef _PSP2COMMON_KERNEL_THREADMGR_H_
7#define _PSP2COMMON_KERNEL_THREADMGR_H_
8
9#include <psp2common/types.h>
10
11#ifdef __cplusplus
12extern "C" {
13#endif
14
33
34typedef enum SceThreadStatus {
39 SCE_THREAD_SUSPEND = 8, /* Compatibility */
41 SCE_THREAD_STOPPED = 16, /* Compatibility */
42 SCE_THREAD_DELETED = 32, /* Thread manager has killed the thread (stack overflow) */
43 SCE_THREAD_KILLED = 32, /* Compatibility */
48
61
62typedef int (* SceKernelThreadEntry)(SceSize args, void *argp);
63
77
132
134#define SCE_KERNEL_THREAD_CPU_AFFINITY_MASK_DEFAULT (0)
135
136
137
139typedef int (* SceKernelCallbackFunction)(int notifyId, int notifyCount, int notifyArg, void *userData);
140
161
162
163
164
171
194
195
196
202
211
216
228
240
241
242
247
252
253
254
259
264
265
266
267
272
280
303
304
305
312
331
332
333#ifdef __cplusplus
334}
335#endif
336
337#endif /* _PSP2COMMON_KERNEL_THREADMGR_H_ */
338
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
SceInt32 changeCpuCount
Number of CPUs to which the thread is moved.
Definition threadmgr.h:125
SceSize size
Size of the SceKernelCondInfo structure.
Definition threadmgr.h:318
char name[32]
NUL-terminated name of the semaphore.
Definition threadmgr.h:181
int numWaitThreads
Definition threadmgr.h:225
int(* SceKernelCallbackFunction)(int notifyId, int notifyCount, int notifyArg, void *userData)
Callback function prototype.
Definition threadmgr.h:139
void * common
User supplied argument for the callback.
Definition threadmgr.h:154
SceSize size
Definition threadmgr.h:249
SceUInt initPattern
Definition threadmgr.h:223
int notifyCount
Unknown.
Definition threadmgr.h:156
SceUID condId
The UID of the condition variable.
Definition threadmgr.h:320
SceUInt32 intrPreemptCount
Interrupt preemption count.
Definition threadmgr.h:119
SceUInt attr
Attributes.
Definition threadmgr.h:292
SceUInt currentPattern
Definition threadmgr.h:224
SceUID waitId
Wait id.
Definition threadmgr.h:113
SceSize size
Size of the SceKernelMutexInfo structure.
Definition threadmgr.h:286
SceUInt32 kStackMemType
Definition threadmgr.h:70
SceSize size
Definition threadmgr.h:261
SceSize size
Definition threadmgr.h:213
SceUInt32 status
Thread status.
Definition threadmgr.h:91
int numWaitThreads
The number of threads waiting on the condition variable.
Definition threadmgr.h:328
SceUInt32 attr
Thread attributes.
Definition threadmgr.h:89
SceUID threadId
The thread id associated with the callback.
Definition threadmgr.h:150
int priority
Definition threadmgr.h:57
SceEventFlagAttributes
Event flag creation attributes.
Definition threadmgr.h:204
SceKernelThreadEntry entry
Thread entry point.
Definition threadmgr.h:93
struct SceKernelThreadRunStatus::@10 cpuInfo[4]
SceUID semaId
The UID of the semaphore.
Definition threadmgr.h:179
SceUInt32 uStackMemType
Definition threadmgr.h:71
char name[32]
The name given to the callback.
Definition threadmgr.h:148
SceInt32 data[4]
Definition threadmgr.h:244
SceInt32 initPriority
Initial priority.
Definition threadmgr.h:99
SceThreadStatus
Definition threadmgr.h:34
SceUInt32 data_0x18
Definition threadmgr.h:74
SceUID threadId
Definition threadmgr.h:56
SceSize size
Size of the SceKernelCondOptParam structure.
Definition threadmgr.h:309
SceSize size
Size of the structure.
Definition threadmgr.h:83
char name[32]
Definition threadmgr.h:221
SceInt32 initCpuAffinityMask
Initial CPU affinity mask.
Definition threadmgr.h:103
void * stack
Thread stack pointer.
Definition threadmgr.h:95
SceUID mutexId
Mutex associated with the condition variable.
Definition threadmgr.h:326
SceEventFlagWaitTypes
Event flag wait types.
Definition threadmgr.h:230
int numWaitThreads
The number of threads waiting on the semaphore.
Definition threadmgr.h:191
SceSize size
Definition threadmgr.h:219
SceUInt attr
Attributes.
Definition threadmgr.h:324
SceInt32 fNotifyCallback
Function notify callback UID.
Definition threadmgr.h:127
SceUID currentOwnerId
The UID of the current owner of the mutex.
Definition threadmgr.h:298
SceUInt32 waitType
Wait type.
Definition threadmgr.h:111
char name[32]
NUL-terminated name of the mutex.
Definition threadmgr.h:290
SceKernelCallbackFunction callback
Pointer to the callback function.
Definition threadmgr.h:152
SceUInt32 uTLSMemType
Definition threadmgr.h:72
SceUID mutexId
The UID of the mutex.
Definition threadmgr.h:288
SceUInt32 uStackMemid
Definition threadmgr.h:73
int notifyArg
Unknown.
Definition threadmgr.h:158
SceSize size
Size of the SceKernelSemaOptParam structure.
Definition threadmgr.h:168
SceUID evfId
Definition threadmgr.h:220
SceUInt attr
Attributes.
Definition threadmgr.h:183
SceInt64 data[4]
Definition threadmgr.h:256
SceKernelWaitableAttribute
Definition threadmgr.h:197
SceKernelSysClock runClocks
Number of clock cycles run.
Definition threadmgr.h:117
SceUInt32 threadReleaseCount
Thread release count.
Definition threadmgr.h:123
SceUID processId
Definition threadmgr.h:55
SceKernelIdListType
Threadmgr types.
Definition threadmgr.h:16
int numWaitThreads
The number of threads waiting on the mutex.
Definition threadmgr.h:300
int currentCount
The current count.
Definition threadmgr.h:296
SceSize size
Size of the SceKernelSemaInfo structure.
Definition threadmgr.h:177
SceKernelMutexAttribute
Definition threadmgr.h:268
int initCount
The initial count the mutex was created with.
Definition threadmgr.h:294
SceSize size
Size of the SceKernelMutexOptParam structure.
Definition threadmgr.h:276
SceInt32 currentPriority
Current priority.
Definition threadmgr.h:101
int currentCount
The current count.
Definition threadmgr.h:187
SceUInt32 threadPreemptCount
Thread preemption count.
Definition threadmgr.h:121
SceInt32 lastExecutedCpuId
Last executed CPU ID.
Definition threadmgr.h:109
int maxCount
The maximum count.
Definition threadmgr.h:189
SceUInt32 attr
Attributes.
Definition threadmgr.h:69
SceUInt attr
Definition threadmgr.h:222
SceUID callbackId
The UID of the callback.
Definition threadmgr.h:146
SceUID processId
The UID of the process where the thread belongs.
Definition threadmgr.h:85
int initCount
The initial count the semaphore was created with.
Definition threadmgr.h:185
char name[32]
Nul terminated name of the thread.
Definition threadmgr.h:87
SceSize size
Definition threadmgr.h:53
SceInt32 reserved
Reserved.
Definition threadmgr.h:129
SceInt32 currentCpuId
Current CPU ID.
Definition threadmgr.h:107
SceInt32 exitStatus
Exit status of the thread.
Definition threadmgr.h:115
SceSize size
Size of the structure (i.e.
Definition threadmgr.h:144
int(* SceKernelThreadEntry)(SceSize args, void *argp)
Definition threadmgr.h:62
int ceilingPriority
Definition threadmgr.h:277
SceSize size
Size of the SceKernelThreadOptParam structure.
Definition threadmgr.h:67
SceInt32 stackSize
Thread stack size.
Definition threadmgr.h:97
char name[32]
NUL-terminated name of the condition variable.
Definition threadmgr.h:322
SceInt32 currentCpuAffinityMask
Current CPU affinity mask.
Definition threadmgr.h:105
@ SCE_EVENT_THREAD_PRIO
Use SCE_KERNEL_ATTR_THREAD_PRIO.
Definition threadmgr.h:206
@ SCE_EVENT_WAITSINGLE
Sync object can only be waited upon by one thread.
Definition threadmgr.h:207
@ SCE_EVENT_OPENABLE
Use SCE_KERNEL_ATTR_OPENABLE.
Definition threadmgr.h:209
@ SCE_EVENT_WAITMULTIPLE
Sync object can be waited upon by multiple threads.
Definition threadmgr.h:208
@ SCE_EVENT_THREAD_FIFO
Use SCE_KERNEL_ATTR_THREAD_FIFO.
Definition threadmgr.h:205
@ SCE_THREAD_RUNNING
Definition threadmgr.h:35
@ SCE_THREAD_SUSPEND
Definition threadmgr.h:39
@ SCE_THREAD_SUSPENDED
Definition threadmgr.h:46
@ SCE_THREAD_STANDBY
Definition threadmgr.h:37
@ SCE_THREAD_READY
Definition threadmgr.h:36
@ SCE_THREAD_DORMANT
Definition threadmgr.h:40
@ SCE_THREAD_STOPPED
Definition threadmgr.h:41
@ SCE_THREAD_DEAD
Definition threadmgr.h:44
@ SCE_THREAD_STAGNANT
Definition threadmgr.h:45
@ SCE_THREAD_KILLED
Definition threadmgr.h:43
@ SCE_THREAD_WAITING
Definition threadmgr.h:38
@ SCE_THREAD_DELETED
Definition threadmgr.h:42
@ SCE_EVENT_WAITAND
Wait for all bits in the pattern to be set.
Definition threadmgr.h:232
@ SCE_EVENT_WAITCLEAR_PAT
Clear the wait pattern when it matches.
Definition threadmgr.h:238
@ SCE_EVENT_WAITCLEAR
Clear all the bits when it matches.
Definition threadmgr.h:236
@ SCE_EVENT_WAITOR
Wait for one or more bits in the pattern to be set.
Definition threadmgr.h:234
@ SCE_KERNEL_ATTR_THREAD_PRIO
Waiting threads queued on priority basis.
Definition threadmgr.h:199
@ SCE_KERNEL_ATTR_THREAD_FIFO
Waiting threads First input First output.
Definition threadmgr.h:198
@ SCE_KERNEL_ATTR_OPENABLE
Sync object can be accessed by sceKernelOpenXxx.
Definition threadmgr.h:200
@ SCE_KERNEL_TMID_VTimer
Definition threadmgr.h:27
@ SCE_KERNEL_TMID_Callback
Definition threadmgr.h:24
@ SCE_KERNEL_TMID_ThreadEventHandler
Definition threadmgr.h:25
@ SCE_KERNEL_TMID_SleepThread
Definition threadmgr.h:28
@ SCE_KERNEL_TMID_DelayThread
Definition threadmgr.h:29
@ SCE_KERNEL_TMID_Fpl
Definition threadmgr.h:22
@ SCE_KERNEL_TMID_Mpipe
Definition threadmgr.h:23
@ SCE_KERNEL_TMID_Alarm
Definition threadmgr.h:26
@ SCE_KERNEL_TMID_Thread
Definition threadmgr.h:17
@ SCE_KERNEL_TMID_Semaphore
Definition threadmgr.h:18
@ SCE_KERNEL_TMID_DormantThread
Definition threadmgr.h:31
@ SCE_KERNEL_TMID_EventFlag
Definition threadmgr.h:19
@ SCE_KERNEL_TMID_SuspendThread
Definition threadmgr.h:30
@ SCE_KERNEL_TMID_Mbox
Definition threadmgr.h:20
@ SCE_KERNEL_TMID_Vpl
Definition threadmgr.h:21
@ SCE_KERNEL_MUTEX_ATTR_RECURSIVE
Definition threadmgr.h:269
@ SCE_KERNEL_MUTEX_ATTR_CEILING
Definition threadmgr.h:270
Structure to hold the status information for a callback.
Definition threadmgr.h:142
Current state of a condition variable.
Definition threadmgr.h:316
Additional options used when creating condition variables.
Definition threadmgr.h:307
Structure to hold the event flag information.
Definition threadmgr.h:218
Definition threadmgr.h:212
Definition threadmgr.h:248
Definition threadmgr.h:243
Definition threadmgr.h:260
Definition threadmgr.h:255
Current state of a mutex.
Definition threadmgr.h:284
Additional options used when creating mutexes.
Definition threadmgr.h:274
Current state of a semaphore.
Definition threadmgr.h:175
Additional options used when creating semaphores.
Definition threadmgr.h:166
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
int32_t SceInt32
Definition types.h:44
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