PSPSDK 2024-10-31
Loading...
Searching...
No Matches
pspthreadman.h
Go to the documentation of this file.
1/*
2 * PSP Software Development Kit - https://github.com/pspdev
3 * -----------------------------------------------------------------------
4 * Licensed under the BSD license, see LICENSE in PSPSDK root for details.
5 *
6 * pspthreadman.h - Library imports for the kernel threading library.
7 *
8 * Copyright (c) 2005 Marcus R. Brown <mrbrown@ocgnet.org>
9 * Copyright (c) 2005 James Forshaw <tyranid@gmail.com>
10 * Copyright (c) 2005 John Kelley <ps2dev@kelley.ca>
11 * Copyright (c) 2005 Florin Sasu
12 *
13 */
14#ifndef __THREADMAN_H__
15#define __THREADMAN_H__
16
17#include <psptypes.h>
18#include <pspkerneltypes.h>
19/* Include for profile register definitions */
20#include <pspdebug.h>
21
22/* Note: Some of the structures, types, and definitions in this file were
23 extrapolated from symbolic debugging information found in the Japanese
24 version of Puzzle Bobble. */
25
30#ifdef __cplusplus
31extern "C" {
32#endif
33
43
63
64/* Maintained for compatibility with older versions of PSPSDK. */
65#define THREAD_ATTR_VFPU PSP_THREAD_ATTR_VFPU
66#define THREAD_ATTR_USER PSP_THREAD_ATTR_USER
67
68
69/* Threads. */
70
71typedef int (*SceKernelThreadEntry)(SceSize args, void *argp);
72
80
122
138
139/* Sure there must be more than this, but haven't seen them */
141{
147 PSP_THREAD_KILLED = 32, /* Thread manager has killed the thread (stack overflow) */
148};
149
168SceUID sceKernelCreateThread(const char *name, SceKernelThreadEntry entry, int initPriority,
169 int stackSize, SceUInt attr, SceKernelThreadOptParam *option);
170
179
188
194int sceKernelExitThread(int status);
195
202
211
220
227
237
244
255
264
273
282
291
301
311
323
335
344
354
364
381
390
399
406
413
422
429
439
458
468
469
470/* Semaphores. */
471
477
497
515
523
539
555
571
581
591
602
618
631
640
650
661
672
673/* Event flags. */
674
684
688
690
697
708
725
735
745
756
768
780
789
799
800
801/* Message boxes. */
802
808
826
838
854
862
885int sceKernelSendMbx(SceUID mbxid, void *message);
886
904
922
939
956
966
967
968/* Alarms. */
969
971typedef SceUInt (*SceKernelAlarmHandler)(void *common);
972
985
995
1006
1015
1025
1026/* Callbacks. */
1027
1029typedef int (*SceKernelCallbackFunction)(int arg1, int arg2, void *arg);
1030
1048
1065
1076
1085
1095
1104
1113
1120
1121/* Misc. */
1122
1142
1155
1171
1180
1181
1193SceUID sceKernelCreateMsgPipe(const char *name, int part, int attr, void *unk1, void *opt);
1194
1203
1216int sceKernelSendMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout);
1217
1230int sceKernelSendMsgPipeCB(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout);
1231
1243int sceKernelTrySendMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2);
1244
1257int sceKernelReceiveMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout);
1258
1271int sceKernelReceiveMsgPipeCB(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout);
1272
1284int sceKernelTryReceiveMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2);
1285
1296
1307
1317
1318/* VPL Functions */
1319
1323
1335SceUID sceKernelCreateVpl(const char *name, int part, int attr, unsigned int size, struct SceKernelVplOptParam *opt);
1336
1345
1356int sceKernelAllocateVpl(SceUID uid, unsigned int size, void **data, unsigned int *timeout);
1357
1368int sceKernelAllocateVplCB(SceUID uid, unsigned int size, void **data, unsigned int *timeout);
1369
1379int sceKernelTryAllocateVpl(SceUID uid, unsigned int size, void **data);
1380
1389int sceKernelFreeVpl(SceUID uid, void *data);
1390
1400
1410
1420
1421/* FPL Functions */
1422
1426
1439int sceKernelCreateFpl(const char *name, int part, int attr, unsigned int size, unsigned int blocks, struct SceKernelFplOptParam *opt);
1440
1449
1459int sceKernelAllocateFpl(SceUID uid, void **data, unsigned int *timeout);
1460
1470int sceKernelAllocateFplCB(SceUID uid, void **data, unsigned int *timeout);
1471
1480int sceKernelTryAllocateFpl(SceUID uid, void **data);
1481
1490int sceKernelFreeFpl(SceUID uid, void *data);
1491
1501
1512
1522
1527
1533
1543
1552
1562int sceKernelSysClock2USec(SceKernelSysClock *clock, unsigned int *low, unsigned int *high);
1563
1573int sceKernelSysClock2USecWide(SceInt64 clock, unsigned *low, unsigned int *high);
1574
1583
1590
1596unsigned int sceKernelGetSystemTimeLow(void);
1597
1601
1611
1620
1630
1639
1649
1658
1668
1678
1687
1696
1699
1711
1723
1732
1743
1753
1759
1768
1769typedef int (*SceKernelThreadEventHandler)(int mask, SceUID thid, void *common);
1770
1780
1788
1796
1809
1818
1828
1834
1840
1843#ifdef __cplusplus
1844}
1845#endif
1846
1847#endif
unsigned short attr
Definition fixup.c:2
int sceKernelDeleteFpl(SceUID uid)
Delete a fixed pool.
int sceKernelReferVplStatus(SceUID uid, SceKernelVplInfo *info)
Get the status of an VPL.
int sceKernelDeleteCallback(SceUID cb)
Delete a callback.
unsigned int sceKernelGetSystemTimeLow(void)
Get the low 32bits of the current system time.
int sceKernelGetThreadmanIdList(enum SceKernelIdListType type, SceUID *readbuf, int readbufsize, int *idcount)
Get a list of UIDs from threadman.
int sceKernelDeleteMbx(SceUID mbxid)
Destroy a messagebox.
int sceKernelDelaySysClockThreadCB(SceKernelSysClock *delay)
Delay the current thread by a specified number of sysclocks handling callbacks.
int sceKernelStartVTimer(SceUID uid)
Start a virtual timer.
int sceKernelTerminateDeleteThread(SceUID thid)
Terminate and delete a thread.
int sceKernelGetCallbackCount(SceUID cb)
Get the callback count.
int sceKernelCancelFpl(SceUID uid, int *pnum)
Cancel a pool.
int sceKernelGetVTimerBase(SceUID uid, SceKernelSysClock *base)
Get the timer base.
int sceKernelExitDeleteThread(int status)
Exit a thread and delete itself.
int sceKernelTryLockLwMutex(SceLwMutexWorkarea *workarea, int lockCount)
Try to lock a lightweight mutex.
int sceKernelCancelVTimerHandler(SceUID uid)
Cancel the timer handler.
ThreadEventIds
Definition pspthreadman.h:1782
int sceKernelSuspendDispatchThread(void)
Suspend the dispatch thread.
int sceKernelSetVTimerHandler(SceUID uid, SceKernelSysClock *time, SceKernelVTimerHandler handler, void *common)
Set the timer handler.
int(* SceKernelThreadEventHandler)(int mask, SceUID thid, void *common)
Definition pspthreadman.h:1769
ThreadEvents
Definition pspthreadman.h:1790
int sceKernelCancelWakeupThread(SceUID thid)
Cancel a thread that was to be woken with sceKernelWakeupThread.
int sceKernelAllocateVplCB(SceUID uid, unsigned int size, void **data, unsigned int *timeout)
Allocate from the pool (with callback)
int sceKernelReferThreadEventHandlerStatus(SceUID uid, struct SceKernelThreadEventHandlerInfo *info)
Refer the status of an thread event handler.
int sceKernelClearEventFlag(SceUID evid, u32 bits)
Clear a event flag bit pattern.
int sceKernelNotifyCallback(SceUID cb, int arg2)
Notify a callback.
int sceKernelStopVTimer(SceUID uid)
Stop a virtual timer.
int sceKernelWaitSemaCB(SceUID semaid, int signal, SceUInt *timeout)
Lock a semaphore a handle callbacks if necessary.
int sceKernelCreateCallback(const char *name, SceKernelCallbackFunction func, void *arg)
Create callback.
int sceKernelResumeThread(SceUID thid)
Resume a thread previously put into a suspended state with sceKernelSuspendThread.
int sceKernelExitThread(int status)
Exit a thread.
int sceKernelWaitEventFlag(int evid, u32 bits, u32 wait, u32 *outBits, SceUInt *timeout)
Wait for an event flag for a given bit pattern.
SceInt64 sceKernelGetVTimerBaseWide(SceUID uid)
Get the timer base (wide format)
int sceKernelGetSystemTime(SceKernelSysClock *time)
Get the system time.
int sceKernelReferSystemStatus(SceKernelSystemStatus *status)
Get the current system status.
int sceKernelDeleteVpl(SceUID uid)
Delete a variable pool.
void _sceKernelExitThread(void)
Exit the thread (probably used as the syscall when the main thread returns.
int sceKernelPollSema(SceUID semaid, int signal)
Poll a sempahore.
int sceKernelCheckThreadStack(void)
Check the thread stack?
int sceKernelGetThreadId(void)
Get the current thread Id.
int sceKernelSetVTimerHandlerWide(SceUID uid, SceInt64 time, SceKernelVTimerHandlerWide handler, void *common)
Set the timer handler (wide mode)
int sceKernelDeleteThread(SceUID thid)
Delate a thread.
enum SceKernelIdListType sceKernelGetThreadmanIdType(SceUID uid)
Get the type of a threadman uid.
int sceKernelGetThreadCurrentPriority(void)
Get the current priority of the thread you are in.
int sceKernelUSec2SysClock(unsigned int usec, SceKernelSysClock *clock)
Convert a number of microseconds to a SceKernelSysClock structure.
int sceKernelSysClock2USecWide(SceInt64 clock, unsigned *low, unsigned int *high)
Convert a wide time to microseconds.
PspEventFlagWaitTypes
Event flag wait types.
Definition pspthreadman.h:700
SceInt64 sceKernelGetSystemTimeWide(void)
Get the system time (wide version)
int sceKernelSendMbx(SceUID mbxid, void *message)
Send a message to a messagebox.
int sceKernelReceiveMbx(SceUID mbxid, void **pmessage, SceUInt *timeout)
Wait for a message to arrive in a messagebox.
SceInt64 sceKernelSetVTimerTimeWide(SceUID uid, SceInt64 time)
Set the timer time (wide format)
int sceKernelUnlockLwMutex(SceLwMutexWorkarea *workarea, int lockCount)
Lock a lightweight mutex.
PspEventFlagAttributes
Event flag creation attributes.
Definition pspthreadman.h:693
int sceKernelCancelMsgPipe(SceUID uid, int *psend, int *precv)
Cancel a message pipe.
int sceKernelResumeDispatchThread(int state)
Resume the dispatch thread.
int sceKernelDeleteMsgPipe(SceUID uid)
Delete a message pipe.
int sceKernelDelayThread(SceUInt delay)
Delay the current thread by a specified number of microseconds.
int sceKernelTryAllocateFpl(SceUID uid, void **data)
Try to allocate from the pool.
SceUID sceKernelRegisterThreadEventHandler(const char *name, SceUID threadID, int mask, SceKernelThreadEventHandler handler, void *common)
Register a thread event handler.
int sceKernelDelayThreadCB(SceUInt delay)
Delay the current thread by a specified number of microseconds and handle any callbacks.
int sceKernelCreateFpl(const char *name, int part, int attr, unsigned int size, unsigned int blocks, struct SceKernelFplOptParam *opt)
Create a fixed pool.
int sceKernelWakeupThread(SceUID thid)
Wake a thread previously put into the sleep state.
int sceKernelGetThreadExitStatus(SceUID thid)
Get the exit status of a thread.
int sceKernelTryAllocateVpl(SceUID uid, unsigned int size, void **data)
Try to allocate from the pool.
int sceKernelReferVTimerStatus(SceUID uid, SceKernelVTimerInfo *info)
Get the status of a VTimer.
int sceKernelReleaseWaitThread(SceUID thid)
Release a thread in the wait state.
int sceKernelReferThreadRunStatus(SceUID thid, SceKernelThreadRunStatus *status)
Retrive the runtime status of a thread.
int sceKernelSuspendThread(SceUID thid)
Suspend a thread.
PspThreadAttributes
Attribute for threads.
Definition pspthreadman.h:46
int sceKernelCancelAlarm(SceUID alarmid)
Cancel a pending alarm.
SceUID sceKernelCreateMsgPipe(const char *name, int part, int attr, void *unk1, void *opt)
Create a message pipe.
SceUID sceKernelSetAlarm(SceUInt clock, SceKernelAlarmHandler handler, void *common)
Set an alarm.
void _sceKernelReturnFromTimerHandler(void)
Return from a timer handler (doesn't seem to do alot)
PspDebugProfilerRegs * sceKernelReferThreadProfiler(void)
Get the thread profiler registers.
PspThreadStatus
Definition pspthreadman.h:141
int sceKernelCancelReceiveMbx(SceUID mbxid, int *pnum)
Abort all wait operations on a messagebox.
int sceKernelChangeThreadPriority(SceUID thid, int priority)
Change the threads current priority.
int sceKernelSleepThread(void)
Sleep thread.
SceUID sceKernelCreateMbx(const char *name, SceUInt attr, SceKernelMbxOptParam *option)
Creates a new messagebox.
SceUID sceKernelCreateEventFlag(const char *name, int attr, int bits, SceKernelEventFlagOptParam *opt)
Create an event flag.
int sceKernelSetVTimerTime(SceUID uid, SceKernelSysClock *time)
Set the timer time.
PspDebugProfilerRegs * sceKernelReferGlobalProfiler(void)
Get the globile profiler registers.
int sceKernelSendMsgPipeCB(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout)
Send a message to a pipe (with callback)
int sceKernelStartThread(SceUID thid, SceSize arglen, void *argp)
Start a created thread.
int sceKernelDelaySysClockThread(SceKernelSysClock *delay)
Delay the current thread by a specified number of sysclocks.
int sceKernelReferMbxStatus(SceUID mbxid, SceKernelMbxInfo *info)
Retrieve information about a messagebox.
int sceKernelRotateThreadReadyQueue(int priority)
Rotate thread ready queue at a set priority.
int sceKernelDeleteLwMutex(SceLwMutexWorkarea *workarea)
Delete a lightweight mutex.
void _sceKernelReturnFromCallback(void)
Return from a callback (used as a syscall for the return of the callback function)
int sceKernelWaitThreadEnd(SceUID thid, SceUInt *timeout)
Wait until a thread has ended.
SceUID sceKernelCreateVTimer(const char *name, struct SceKernelVTimerOptParam *opt)
Create a virtual timer.
SceUInt(* SceKernelVTimerHandler)(SceUID uid, SceKernelSysClock *, SceKernelSysClock *, void *)
Definition pspthreadman.h:1697
PspLwMutexAttributes
Attribute for lightweight mutex.
Definition pspthreadman.h:594
int sceKernelCancelVpl(SceUID uid, int *pnum)
Cancel a pool.
SceKernelIdListType
Threadman types for sceKernelGetThreadmanIdList.
Definition pspthreadman.h:1125
int sceKernelPollMbx(SceUID mbxid, void **pmessage)
Check if a message has arrived in a messagebox.
int sceKernelSignalSema(SceUID semaid, int signal)
Send a signal to a semaphore.
int sceKernelWaitSema(SceUID semaid, int signal, SceUInt *timeout)
Lock a semaphore.
int sceKernelWaitThreadEndCB(SceUID thid, SceUInt *timeout)
Wait until a thread has ended and handle callbacks if necessary.
int sceKernelDeleteEventFlag(int evid)
Delete an event flag.
int sceKernelAllocateVpl(SceUID uid, unsigned int size, void **data, unsigned int *timeout)
Allocate from the pool.
int sceKernelDeleteSema(SceUID semaid)
Destroy a semaphore.
int sceKernelReferSemaStatus(SceUID semaid, SceKernelSemaInfo *info)
Retrieve information about a semaphore.
int sceKernelFreeVpl(SceUID uid, void *data)
Free a block.
int sceKernelSleepThreadCB(void)
Sleep thread but service any callbacks as necessary.
int sceKernelAllocateFplCB(SceUID uid, void **data, unsigned int *timeout)
Allocate from the pool (with callback)
int sceKernelReferMsgPipeStatus(SceUID uid, SceKernelMppInfo *info)
Get the status of a Message Pipe.
SceUID sceKernelSetSysClockAlarm(SceKernelSysClock *clock, SceKernelAlarmHandler handler, void *common)
Set an alarm using a SceKernelSysClock structure for the time.
SceUID sceKernelCreateVpl(const char *name, int part, int attr, unsigned int size, struct SceKernelVplOptParam *opt)
Create a variable pool.
int sceKernelCancelCallback(SceUID cb)
Cancel a callback ?
int sceKernelReleaseThreadEventHandler(SceUID uid)
Release a thread event handler.
int sceKernelReferCallbackStatus(SceUID cb, SceKernelCallbackInfo *status)
Gets the status of a specified callback.
int sceKernelSendMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout)
Send a message to a pipe.
int sceKernelWaitEventFlagCB(int evid, u32 bits, u32 wait, u32 *outBits, SceUInt *timeout)
Wait for an event flag for a given bit pattern with callback.
int sceKernelAllocateFpl(SceUID uid, void **data, unsigned int *timeout)
Allocate from the pool.
SceUID sceKernelCreateThread(const char *name, SceKernelThreadEntry entry, int initPriority, int stackSize, SceUInt attr, SceKernelThreadOptParam *option)
Create a thread.
SceUID sceKernelCreateSema(const char *name, SceUInt attr, int initVal, int maxVal, SceKernelSemaOptParam *option)
Creates a new semaphore.
int(* SceKernelCallbackFunction)(int arg1, int arg2, void *arg)
Callback function prototype.
Definition pspthreadman.h:1029
int sceKernelGetVTimerTime(SceUID uid, SceKernelSysClock *time)
Get the timer time.
int sceKernelSetEventFlag(SceUID evid, u32 bits)
Set an event flag bit pattern.
int sceKernelDeleteVTimer(SceUID uid)
Delete a virtual timer.
int sceKernelCreateLwMutex(SceLwMutexWorkarea *workarea, const char *name, SceUInt32 attr, int initialCount, u32 *optionsPtr)
Create a lightweight mutex.
int sceKernelReceiveMsgPipeCB(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout)
Receive a message from a pipe (with callback)
int sceKernelTryReceiveMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2)
Receive a message from a pipe.
int sceKernelReferThreadStatus(SceUID thid, SceKernelThreadInfo *info)
Get the status information for the specified thread.
int sceKernelFreeFpl(SceUID uid, void *data)
Free a block.
int sceKernelTerminateThread(SceUID thid)
Terminate a thread.
SceInt64 sceKernelGetVTimerTimeWide(SceUID uid)
Get the timer time (wide format)
int sceKernelSysClock2USec(SceKernelSysClock *clock, unsigned int *low, unsigned int *high)
Convert a SceKernelSysClock structure to microseconds.
int sceKernelReferEventFlagStatus(SceUID event, SceKernelEventFlagInfo *status)
Get the status of an event flag.
int sceKernelTrySendMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2)
Try to send a message to a pipe.
SceUInt(* SceKernelVTimerHandlerWide)(SceUID uid, SceInt64, SceInt64, void *)
Definition pspthreadman.h:1698
int sceKernelReceiveMsgPipe(SceUID uid, void *message, unsigned int size, int unk1, void *unk2, unsigned int *timeout)
Receive a message from a pipe.
int(* SceKernelThreadEntry)(SceSize args, void *argp)
Definition pspthreadman.h:71
SceInt64 sceKernelUSec2SysClockWide(unsigned int usec)
Convert a number of microseconds to a wide time.
int sceKernelPollEventFlag(int evid, u32 bits, u32 wait, u32 *outBits)
Poll an event flag for a given bit pattern.
int sceKernelCheckCallback(void)
Check callback ?
int sceKernelLockLwMutex(SceLwMutexWorkarea *workarea, int lockCount, unsigned int *pTimeout)
Lock a lightweight mutex.
int sceKernelReferAlarmStatus(SceUID alarmid, SceKernelAlarmInfo *info)
Refer the status of a created alarm.
int sceKernelReferFplStatus(SceUID uid, SceKernelFplInfo *info)
Get the status of an FPL.
int sceKernelChangeCurrentThreadAttr(int unknown, SceUInt attr)
Modify the attributes of the current thread.
int sceKernelReceiveMbxCB(SceUID mbxid, void **pmessage, SceUInt *timeout)
Wait for a message to arrive in a messagebox and handle callbacks if necessary.
SceUInt(* SceKernelAlarmHandler)(void *common)
Prototype for alarm handlers.
Definition pspthreadman.h:971
int sceKernelGetThreadStackFreeSize(SceUID thid)
Get the free stack size for a thread.
@ THREADEVENT_CURRENT
Definition pspthreadman.h:1786
@ THREADEVENT_USER
Definition pspthreadman.h:1785
@ THREADEVENT_KERN
Definition pspthreadman.h:1784
@ THREADEVENT_ALL
Definition pspthreadman.h:1783
@ THREAD_CREATE
Definition pspthreadman.h:1791
@ THREAD_DELETE
Definition pspthreadman.h:1794
@ THREAD_EXIT
Definition pspthreadman.h:1793
@ THREAD_START
Definition pspthreadman.h:1792
@ PSP_EVENT_WAITOR
Wait for one or more bits in the pattern to be set.
Definition pspthreadman.h:704
@ PSP_EVENT_WAITCLEAR
Clear the wait pattern when it matches.
Definition pspthreadman.h:706
@ PSP_EVENT_WAITAND
Wait for all bits in the pattern to be set.
Definition pspthreadman.h:702
@ PSP_EVENT_WAITMULTIPLE
Allow the event flag to be waited upon by multiple threads.
Definition pspthreadman.h:695
@ PSP_THREAD_ATTR_SCRATCH_SRAM
Allow using scratchpad memory for a thread, NOT USABLE ON V1.0.
Definition pspthreadman.h:57
@ PSP_THREAD_ATTR_VSH
Thread is part of the VSH API.
Definition pspthreadman.h:55
@ PSP_THREAD_ATTR_USBWLAN
Thread is part of the USB/WLAN API.
Definition pspthreadman.h:53
@ PSP_THREAD_ATTR_CLEAR_STACK
Clear the stack when the thread is deleted.
Definition pspthreadman.h:61
@ PSP_THREAD_ATTR_VFPU
Enable VFPU access for the thread.
Definition pspthreadman.h:48
@ PSP_THREAD_ATTR_USER
Start the thread in user mode (done automatically if the thread creating it is in user mode).
Definition pspthreadman.h:51
@ PSP_THREAD_ATTR_NO_FILLSTACK
Disables filling the stack with 0xFF on creation.
Definition pspthreadman.h:59
@ PSP_THREAD_RUNNING
Definition pspthreadman.h:142
@ PSP_THREAD_KILLED
Definition pspthreadman.h:147
@ PSP_THREAD_SUSPEND
Definition pspthreadman.h:145
@ PSP_THREAD_READY
Definition pspthreadman.h:143
@ PSP_THREAD_STOPPED
Definition pspthreadman.h:146
@ PSP_THREAD_WAITING
Definition pspthreadman.h:144
@ PSP_LW_MUTEX_ATTR_RECURSIVE
A recursive lock is allowed by the thread that acquired the lightweight mutex.
Definition pspthreadman.h:600
@ PSP_LW_MUTEX_ATTR_THPRI
The wait thread is queued by thread priority .
Definition pspthreadman.h:598
@ PSP_LW_MUTEX_ATTR_THFIFO
The wait thread is queued using FIFO.
Definition pspthreadman.h:596
@ SCE_KERNEL_TMID_VTimer
Definition pspthreadman.h:1136
@ SCE_KERNEL_TMID_Callback
Definition pspthreadman.h:1133
@ SCE_KERNEL_TMID_ThreadEventHandler
Definition pspthreadman.h:1134
@ SCE_KERNEL_TMID_SleepThread
Definition pspthreadman.h:1137
@ SCE_KERNEL_TMID_DelayThread
Definition pspthreadman.h:1138
@ SCE_KERNEL_TMID_Fpl
Definition pspthreadman.h:1131
@ SCE_KERNEL_TMID_Mpipe
Definition pspthreadman.h:1132
@ SCE_KERNEL_TMID_Alarm
Definition pspthreadman.h:1135
@ SCE_KERNEL_TMID_Thread
Definition pspthreadman.h:1126
@ SCE_KERNEL_TMID_Semaphore
Definition pspthreadman.h:1127
@ SCE_KERNEL_TMID_DormantThread
Definition pspthreadman.h:1140
@ SCE_KERNEL_TMID_EventFlag
Definition pspthreadman.h:1128
@ SCE_KERNEL_TMID_SuspendThread
Definition pspthreadman.h:1139
@ SCE_KERNEL_TMID_Mbox
Definition pspthreadman.h:1129
@ SCE_KERNEL_TMID_Vpl
Definition pspthreadman.h:1130
unsigned int SceUInt
Definition pspkerneltypes.h:31
unsigned int SceSize
Definition pspkerneltypes.h:27
int SceUID
UIDs are used to describe many different kernel objects.
Definition pspkerneltypes.h:24
unsigned char SceUChar
Definition pspkerneltypes.h:30
char * name
Definition pspsysmem_kernel.h:4
unsigned char size
Definition pspsysmem_kernel.h:6
struct _uidControlBlock * type
Definition pspsysmem_kernel.h:2
int64_t SceInt64
Definition psptypes.h:88
uint32_t SceUInt32
Definition psptypes.h:80
float x
Definition psptypes.h:0
uint32_t u32
Definition psptypes.h:41
Struct containing alarm info.
Definition pspthreadman.h:974
SceSize size
Size of the structure (should be set before calling :: sceKernelReferAlarmStatus.
Definition pspthreadman.h:977
SceKernelSysClock schedule
Definition pspthreadman.h:979
SceKernelAlarmHandler handler
Pointer to the alarm handler.
Definition pspthreadman.h:981
void * common
Common pointer argument.
Definition pspthreadman.h:983
Structure to hold the status information for a callback.
Definition pspthreadman.h:1032
void * common
User supplied argument for the callback.
Definition pspthreadman.h:1042
int notifyCount
Unknown.
Definition pspthreadman.h:1044
SceUID threadId
The thread id associated with the callback.
Definition pspthreadman.h:1038
char name[32]
The name given to the callback.
Definition pspthreadman.h:1036
SceKernelCallbackFunction callback
Pointer to the callback function.
Definition pspthreadman.h:1040
int notifyArg
Unknown.
Definition pspthreadman.h:1046
SceSize size
Size of the structure (i.e.
Definition pspthreadman.h:1034
Structure to hold the event flag information.
Definition pspthreadman.h:676
int numWaitThreads
Definition pspthreadman.h:682
SceUInt initPattern
Definition pspthreadman.h:680
SceUInt currentPattern
Definition pspthreadman.h:681
char name[32]
Definition pspthreadman.h:678
SceSize size
Definition pspthreadman.h:677
SceUInt attr
Definition pspthreadman.h:679
Definition pspthreadman.h:685
SceSize size
Definition pspthreadman.h:686
Fixed pool status information.
Definition pspthreadman.h:1503
int numWaitThreads
Definition pspthreadman.h:1510
char name[32]
Definition pspthreadman.h:1505
int numBlocks
Definition pspthreadman.h:1508
SceUInt attr
Definition pspthreadman.h:1506
SceSize size
Definition pspthreadman.h:1504
int freeBlocks
Definition pspthreadman.h:1509
int blockSize
Definition pspthreadman.h:1507
Definition pspthreadman.h:1423
SceSize size
Definition pspthreadman.h:1424
Current state of a messagebox.
Definition pspthreadman.h:812
SceUInt attr
Attributes.
Definition pspthreadman.h:818
char name[32]
NUL-terminated name of the messagebox.
Definition pspthreadman.h:816
SceSize size
Size of the SceKernelMbxInfo structure.
Definition pspthreadman.h:814
int numMessages
Number of messages currently in the messagebox.
Definition pspthreadman.h:822
int numWaitThreads
The number of threads waiting on the messagebox.
Definition pspthreadman.h:820
void * firstMessage
The message currently at the head of the queue.
Definition pspthreadman.h:824
Additional options used when creating messageboxes.
Definition pspthreadman.h:804
SceSize size
Size of the SceKernelMbxOptParam structure.
Definition pspthreadman.h:806
Message Pipe status info.
Definition pspthreadman.h:1298
int bufSize
Definition pspthreadman.h:1302
SceSize size
Definition pspthreadman.h:1299
int numSendWaitThreads
Definition pspthreadman.h:1304
char name[32]
Definition pspthreadman.h:1300
int numReceiveWaitThreads
Definition pspthreadman.h:1305
SceUInt attr
Definition pspthreadman.h:1301
int freeSize
Definition pspthreadman.h:1303
Header for a message box packet.
Definition pspthreadman.h:830
struct SceKernelMsgPacket * next
Pointer to next msg (used by the kernel)
Definition pspthreadman.h:832
SceUChar msgPriority
Priority ?
Definition pspthreadman.h:834
SceUChar dummy[3]
Definition pspthreadman.h:835
Current state of a semaphore.
Definition pspthreadman.h:481
char name[32]
NUL-terminated name of the semaphore.
Definition pspthreadman.h:485
int numWaitThreads
The number of threads waiting on the semaphore.
Definition pspthreadman.h:495
SceUInt attr
Attributes.
Definition pspthreadman.h:487
SceSize size
Size of the SceKernelSemaInfo structure.
Definition pspthreadman.h:483
int currentCount
The current count.
Definition pspthreadman.h:491
int maxCount
The maximum count.
Definition pspthreadman.h:493
int initCount
The initial count the semaphore was created with.
Definition pspthreadman.h:489
Additional options used when creating semaphores.
Definition pspthreadman.h:473
SceSize size
Size of the SceKernelSemaOptParam structure.
Definition pspthreadman.h:475
64-bit system clock type.
Definition pspthreadman.h:39
SceUInt32 low
Definition pspthreadman.h:40
SceUInt32 hi
Definition pspthreadman.h:41
Structure to contain the system status returned by sceKernelReferSystemStatus.
Definition pspthreadman.h:1157
SceSize size
Size of the structure (should be set prior to the call)
Definition pspthreadman.h:1159
SceUInt vfpuSwitchCount
Number of vfpu switches ?
Definition pspthreadman.h:1169
SceKernelSysClock idleClocks
The number of cpu clocks in the idle thread.
Definition pspthreadman.h:1163
SceUInt threadSwitchCount
Number of thread context switches.
Definition pspthreadman.h:1167
SceUInt status
The status ?
Definition pspthreadman.h:1161
SceUInt comesOutOfIdleCount
Number of times we resumed from idle.
Definition pspthreadman.h:1165
Struct for event handler info.
Definition pspthreadman.h:1772
void * common
Definition pspthreadman.h:1778
SceKernelThreadEventHandler handler
Definition pspthreadman.h:1777
SceUID threadId
Definition pspthreadman.h:1775
SceSize size
Definition pspthreadman.h:1773
int mask
Definition pspthreadman.h:1776
char name[32]
Definition pspthreadman.h:1774
Structure to hold the status information for a thread.
Definition pspthreadman.h:84
int wakeupCount
Wakeup count.
Definition pspthreadman.h:110
int exitStatus
Exit status of the thread.
Definition pspthreadman.h:112
SceUInt threadPreemptCount
Thread preemption count.
Definition pspthreadman.h:118
SceUID waitId
Wait id.
Definition pspthreadman.h:108
SceKernelThreadEntry entry
Thread entry point.
Definition pspthreadman.h:94
int stackSize
Thread stack size.
Definition pspthreadman.h:98
SceUInt releaseCount
Release count.
Definition pspthreadman.h:120
int status
Thread status.
Definition pspthreadman.h:92
SceSize size
Size of the structure.
Definition pspthreadman.h:86
SceUInt intrPreemptCount
Interrupt preemption count.
Definition pspthreadman.h:116
void * stack
Thread stack pointer.
Definition pspthreadman.h:96
SceUInt attr
Thread attributes.
Definition pspthreadman.h:90
SceKernelSysClock runClocks
Number of clock cycles run.
Definition pspthreadman.h:114
int currentPriority
Current priority.
Definition pspthreadman.h:104
void * gpReg
Pointer to the gp.
Definition pspthreadman.h:100
int initPriority
Initial priority.
Definition pspthreadman.h:102
int waitType
Wait type.
Definition pspthreadman.h:106
char name[32]
Nul terminated name of the thread.
Definition pspthreadman.h:88
Additional options used when creating threads.
Definition pspthreadman.h:74
SceUID stackMpid
UID of the memory block (?) allocated for the thread's stack.
Definition pspthreadman.h:78
SceSize size
Size of the SceKernelThreadOptParam structure.
Definition pspthreadman.h:76
Statistics about a running thread.
Definition pspthreadman.h:126
SceUInt threadPreemptCount
Definition pspthreadman.h:135
SceUInt intrPreemptCount
Definition pspthreadman.h:134
SceUInt releaseCount
Definition pspthreadman.h:136
int waitType
Definition pspthreadman.h:130
int waitId
Definition pspthreadman.h:131
int wakeupCount
Definition pspthreadman.h:132
int status
Definition pspthreadman.h:128
SceKernelSysClock runClocks
Definition pspthreadman.h:133
int currentPriority
Definition pspthreadman.h:129
SceSize size
Definition pspthreadman.h:127
Definition pspthreadman.h:1733
SceSize size
Definition pspthreadman.h:1734
void * common
Definition pspthreadman.h:1741
int active
Definition pspthreadman.h:1736
SceKernelSysClock current
Definition pspthreadman.h:1738
SceKernelSysClock schedule
Definition pspthreadman.h:1739
char name[32]
Definition pspthreadman.h:1735
SceKernelSysClock base
Definition pspthreadman.h:1737
SceKernelVTimerHandler handler
Definition pspthreadman.h:1740
Definition pspthreadman.h:1598
SceSize size
Definition pspthreadman.h:1599
Variable pool status info.
Definition pspthreadman.h:1402
int poolSize
Definition pspthreadman.h:1406
SceUInt attr
Definition pspthreadman.h:1405
int numWaitThreads
Definition pspthreadman.h:1408
char name[32]
Definition pspthreadman.h:1404
int freeSize
Definition pspthreadman.h:1407
SceSize size
Definition pspthreadman.h:1403
Definition pspthreadman.h:1320
SceSize size
Definition pspthreadman.h:1321
Struct as workarea for lightweight mutex.
Definition pspthreadman.h:604
int attr
Attribute.
Definition pspthreadman.h:610
SceUID uid
UID.
Definition pspthreadman.h:614
int numWaitThreads
Number of waiting threads.
Definition pspthreadman.h:612
SceUID lockThread
Locking thread.
Definition pspthreadman.h:608
int lockLevel
Count.
Definition pspthreadman.h:606
Structure to hold the psp profiler register values.
Definition pspdebug.h:275