![]() |
vitasdk
Documentation of the vitasdk
|
Exports for Kernel. More...
Data Structures | |
| struct | SceArmCpuRegisters |
| Structure representing all ARM registers. More... | |
| struct | SceThreadCpuRegisters |
| Structure containing a threads register states. More... | |
| struct | SceKernelThreadContextInfo |
| struct | SceKernelFaultingProcessInfo |
| struct | SceKernelFastMutex |
| struct | SceKernelLwCondInfo |
| struct | SceKernelLwMutexInfo |
| struct | SceKernelMsgPipeInfo |
| struct | MsgPipeSendData |
| struct | MsgPipeRecvData |
| union | SceThreadCpuRegisters.SCE_DEPRECATED_EX |
| struct | SceThreadCpuRegisters.SCE_DEPRECATED_EX.__unnamed46__ |
Macros | |
| #define | ksceKernelGetFaultingProcessInfo(info) ksceKernelGetThreadContextInfo((SceKernelThreadContextInfo*)info) |
| #define | ksceKernelDeleteFastMutex(__fast_mutex__) ksceKernelFinalizeFastMutex((__fast_mutex__)) |
Typedefs | |
| typedef SceArmCpuRegisters | ArmCpuRegisters |
| typedef SceThreadCpuRegisters | ThreadCpuRegisters |
| typedef int(* | SceKernelWorkQueueWorkFunction) (void *args) |
Functions | |
| int | sceKernelChangeThreadVfpException (SceUInt32 clear, SceUInt32 set) |
| Change the current thread vfp exception mask. | |
| int | ksceKernelCreateCallback (const char *name, unsigned int attr, SceKernelCallbackFunction func, void *arg) |
| Create callback. | |
| int | ksceKernelDeleteCallback (SceUID cb) |
| Delete a callback. | |
| int | ksceKernelNotifyCallback (SceUID cb, int arg2) |
| Notify a callback. | |
| int | ksceKernelCancelCallback (SceUID cb) |
| Cancel a callback ? | |
| int | ksceKernelGetCallbackCount (SceUID cb) |
| Get the callback count. | |
| int | ksceKernelCheckCallback (void) |
| Check callback ? | |
| SceUID | ksceKernelCreateCond (const char *name, SceUInt attr, SceUID mutexId, const SceKernelCondOptParam *option) |
| Creates a new condition variable. | |
| int | ksceKernelDeleteCond (SceUID condId) |
| Destroy a condition variable. | |
| int | ksceKernelWaitCond (SceUID condId, unsigned int *timeout) |
| Waits for a signal of a condition variable. | |
| int | ksceKernelSignalCond (SceUID condId) |
| Signals a condition variable. | |
| int | ksceKernelSignalCondAll (SceUID condId) |
| Signals a condition variable to all threads waiting for it. | |
| int | ksceKernelSignalCondTo (SceUID condId, SceUID threadId) |
| Signals a condition variable to a specific thread waiting for it. | |
| VITASDK_BUILD_ASSERT_EQ (0x48, SceArmCpuRegisters) | |
| VITASDK_BUILD_ASSERT_EQ (0x90, SceThreadCpuRegisters) | |
| VITASDK_BUILD_ASSERT_EQ (8, SceKernelThreadContextInfo) | |
| int | ksceKernelGetThreadIdList (SceUID pid, SceUID *ids, int n, int *copy_count) |
| Retrieve a list of all threads belonging to a process. | |
| int | ksceKernelGetThreadCpuRegisters (SceUID thid, SceThreadCpuRegisters *registers) |
| Query the state of the registers for a suspended thread. | |
| int | ksceKernelGetThreadContextInfo (SceKernelThreadContextInfo *pInfo) |
| Obtain the context information for the thread scheduled on this CPU. | |
| int | ksceKernelChangeThreadSuspendStatus (SceUID thid, int status) |
| Change the thread suspension status to another value. | |
| SceUID | ksceKernelGetUserThreadId (SceUID thid) |
| Get thread PUID from GUID. | |
| int | ksceKernelIsThreadDebugSuspended (SceUID thid) |
| Get thread suspend status. | |
| int | ksceKernelDebugSuspendThread (SceUID thid, int status) |
| Debug suspend a thread. | |
| int | ksceKernelDebugResumeThread (SceUID thid, int status) |
| Debug resume a thread. | |
| int | ksceKernelGetThreadInfoForDebugger (SceUID thid, int a2, void *pInfo) |
| int | ksceKernelGetVfpRegisterForDebugger (SceUID thid, void *pVfpRegister) |
| struct SceKernelFaultingProcessInfo | SCE_DEPRECATED_EX (SceKernelFaultingProcessInfo, "This structure has been replaced by SceKernelThreadContextInfo") |
| int | ksceKernelGetEventFlagInfo (SceUID evfid, SceKernelEventFlagInfo *info) |
| Get event flags info. | |
| SceUID | ksceKernelCreateEventFlag (const char *name, int attr, int bits, SceKernelEventFlagOptParam *opt) |
| Create an event flag. | |
| int | ksceKernelSetEventFlag (SceUID evfid, unsigned int bits) |
| Set an event flag bit pattern. | |
| int | ksceKernelClearEventFlag (SceUID evfid, unsigned int bits) |
| Clear a event flag bit pattern. | |
| int | ksceKernelPollEventFlag (SceUID evfid, unsigned int bits, unsigned int wait, unsigned int *outBits) |
| Poll an event flag for a given bit pattern. | |
| int | ksceKernelWaitEventFlag (SceUID evfid, unsigned int bits, unsigned int wait, unsigned int *outBits, SceUInt *timeout) |
| Wait for an event flag for a given bit pattern. | |
| int | ksceKernelWaitEventFlagCB (SceUID evfid, unsigned int bits, unsigned int wait, unsigned int *outBits, SceUInt *timeout) |
| Wait for an event flag for a given bit pattern with callback. | |
| int | ksceKernelDeleteEventFlag (SceUID evfid) |
| Delete an event flag. | |
| VITASDK_BUILD_ASSERT_EQ (0x40, SceKernelFastMutex) | |
| int | ksceKernelInitializeFastMutex (SceKernelFastMutex *fast_mutex, const char *name, int attr, void *opt) |
| int | ksceKernelFinalizeFastMutex (SceKernelFastMutex *fast_mutex) |
| int | ksceKernelLockFastMutex (SceKernelFastMutex *fast_mutex) |
| int | ksceKernelTryLockFastMutex (SceKernelFastMutex *fast_mutex) |
| int | ksceKernelUnlockFastMutex (SceKernelFastMutex *fast_mutex) |
| int | ksceKernelGetFastMutexInfo (SceKernelFastMutex *fast_mutex, void *info) |
| VITASDK_BUILD_ASSERT_EQ (0x38, SceKernelLwCondInfo) | |
| int | ksceKernelGetLwCondInfo (SceUID lwcond_id, SceKernelLwCondInfo *info) |
| VITASDK_BUILD_ASSERT_EQ (0x40, SceKernelLwMutexInfo) | |
| int | ksceKernelGetLwMutexInfo (SceUID lwmtxid, SceKernelLwMutexInfo *info) |
| SceKernelIdListType | ksceKernelGetThreadmgrUIDClass (SceUID uid) |
| Get the type of a Threadmgr uid. | |
| SceUInt32 | ksceKernelGetSystemTimeLow (void) |
| Get the system time. | |
| SceInt64 | ksceKernelGetSystemTimeWide (void) |
| Get the system time (wide version) | |
| void * | ksceKernelGetThreadTLSAddr (SceUID thid, int key) |
| ksceKernelGetThreadTLSAddr gets an address to a 4 bytes area of TLS memory for the specified thread | |
| void * | ksceKernelGetTLSAddr (int key) |
| ksceKernelGetTLSAddr get pointer to TLS key area for current thread | |
| int | ksceKernelSetPermission (int value) |
| Set Permission. | |
| SceUID | ksceKernelGetProcessId (void) |
| Gets the current process PID. | |
| SceUID | ksceKernelGetProcessIdFromTLS (void) |
| Get Process id from Thread Local Storage. | |
| SceUID | ksceKernelSetProcessIdToTLS (SceUID pid) |
| Set Process id to Thread Local Storage. | |
| int | ksceKernelRunWithStack (SceSize stack_size, int(*to_call)(void *), void *args) |
| Runs a function with larger stack size. | |
| VITASDK_BUILD_ASSERT_EQ (0x3C, SceKernelMsgPipeInfo) | |
| int | ksceKernelGetMsgPipeInfo (SceUID msgpipe_id, SceKernelMsgPipeInfo *info) |
| Get msgpipe info. | |
| SceUID | ksceKernelCreateMsgPipe (const char *name, int type, int attr, SceSize bufSize, void *opt) |
| Create a message pipe. | |
| int | ksceKernelDeleteMsgPipe (SceUID uid) |
| Delete a message pipe. | |
| int | ksceKernelSendMsgPipeVector (SceUID uid, const MsgPipeSendData *v, unsigned int n, int unk1, void *unk2, unsigned int *timeout) |
| Send a message to a pipe. | |
| int | ksceKernelTrySendMsgPipeVector (SceUID uid, const MsgPipeSendData *v, SceSize size, int unk1, void *unk2) |
| Try to send a message to a pipe. | |
| int | ksceKernelReceiveMsgPipeVector (SceUID uid, const MsgPipeRecvData *v, unsigned int n, int unk1, void *unk2, unsigned int *timeout) |
| Receive a message from a pipe. | |
| int | ksceKernelTryReceiveMsgPipeVector (SceUID uid, const MsgPipeRecvData *v, SceSize size, int unk1, void *unk2) |
| Receive a message from a pipe. | |
| int | ksceKernelCancelMsgPipe (SceUID uid, int *psend, int *precv) |
| Cancel a message pipe. | |
| SceUID | ksceKernelCreateMutex (const char *name, SceUInt attr, int initCount, SceKernelMutexOptParam *option) |
| Creates a new mutex. | |
| int | ksceKernelDeleteMutex (SceUID mutexid) |
| Destroy a mutex. | |
| int | ksceKernelLockMutex (SceUID mutexid, int lockCount, unsigned int *timeout) |
| Lock a mutex. | |
| int | ksceKernelTryLockMutex (SceUID mutexid, int lockCount) |
| Try to lock a mutex (non-blocking) | |
| int | ksceKernelUnlockMutex (SceUID mutexid, int unlockCount) |
| Try to unlock a mutex (non-blocking) | |
| int | ksceKernelCancelMutex (SceUID mutexid, int newCount, int *numWaitThreads) |
| Cancels a mutex. | |
| int | ksceKernelGetMutexInfo (SceUID mutexid, SceKernelMutexInfo *info) |
| Retrieve information about a mutex. | |
| int | ksceKernelGetSemaInfo (SceUID semaid, SceKernelSemaInfo *info) |
| Get semaphore info. | |
| SceUID | ksceKernelCreateSema (const char *name, SceUInt attr, int initVal, int maxVal, SceKernelSemaOptParam *option) |
| Creates a new semaphore. | |
| int | ksceKernelDeleteSema (SceUID semaid) |
| Destroy a semaphore. | |
| int | ksceKernelSignalSema (SceUID semaid, int signal) |
| Send a signal to a semaphore. | |
| int | ksceKernelWaitSema (SceUID semaid, int signal, SceUInt *timeout) |
| Lock a semaphore. | |
| int | ksceKernelPollSema (SceUID semaid, int signal) |
| Poll a semaphore. | |
| SceUID | ksceKernelCreateThread (const char *name, SceKernelThreadEntry entry, int initPriority, SceSize stackSize, SceUInt attr, int cpuAffinityMask, const SceKernelThreadOptParam *option) |
| Create a thread. | |
| int | ksceKernelDeleteThread (SceUID thid) |
| Delate a thread. | |
| int | ksceKernelStartThread (SceUID thid, SceSize arglen, void *argp) |
| Start a created thread. | |
| int | ksceKernelExitThread (int status) |
| Exit a thread. | |
| int | ksceKernelExitDeleteThread (int status) |
| Exit a thread and delete itself. | |
| int | ksceKernelWaitThreadEnd (SceUID thid, int *stat, SceUInt *timeout) |
| Wait until a thread has ended. | |
| int | ksceKernelWaitThreadEndCB (SceUID thid, int *stat, SceUInt *timeout) |
| Wait until a thread has ended and handle callbacks if necessary. | |
| int | ksceKernelDelayThread (SceUInt delay) |
| Delay the current thread by a specified number of microseconds. | |
| int | ksceKernelDelayThreadCB (SceUInt delay) |
| Delay the current thread by a specified number of microseconds and handle any callbacks. | |
| int | ksceKernelChangeThreadPriority (SceUID thid, int priority) |
| Change the threads current priority. | |
| int | ksceKernelGetThreadId (void) |
| Get the current thread Id. | |
| int | ksceKernelGetThreadCurrentPriority (void) |
| Get the current priority of the thread you are in. | |
| int | ksceKernelGetThreadStackFreeSize (SceUID thid) |
| Get the free stack size for a thread. | |
| int | ksceKernelGetThreadInfo (SceUID thid, SceKernelThreadInfo *info) |
| Get the thread info by thread id. | |
| int | ksceKernelChangeThreadVfpException (SceUInt32 clear, SceUInt32 set) |
| Change the current thread vfp exception mask. | |
| int | ksceKernelEnqueueWorkQueue (SceUID uid, const char *name, SceKernelWorkQueueWorkFunction work, void *args) |
| Enqueue work to a workqueue. | |
Exports for Kernel.
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
Include the header file in your project:
Link the library to the executable:
| struct SceArmCpuRegisters |
| struct SceThreadCpuRegisters |
Structure containing a threads register states.
| Data Fields | ||
|---|---|---|
| union SceThreadCpuRegisters.SCE_DEPRECATED_EX | SCE_DEPRECATED_EX | |
| struct SceKernelFastMutex |
| Data Fields | ||
|---|---|---|
| SceUInt8 | data[0x40] | |
| struct SceKernelLwCondInfo |
| Data Fields | ||
|---|---|---|
| SceSize | size | |
| SceUID | lwcond_id | |
| char | name[0x20] | |
| int | attr | |
| SceKernelLwCondWork * | work | |
| SceKernelLwMutexWork * | lwmutex | |
| int | num_wait_threads | |
| struct SceKernelLwMutexInfo |
| Data Fields | ||
|---|---|---|
| SceSize | size | |
| SceUID | mtxid | |
| char | name[0x20] | |
| int | attr | |
| SceKernelLwMutexWork * | work | |
| int | init_count | |
| int | current_count | |
| SceUID | current_owner_id | |
| SceUInt32 | num_wait_threads | |
| struct SceKernelMsgPipeInfo |
| struct MsgPipeSendData |
| Data Fields | ||
|---|---|---|
| const void * | message | |
| SceSize | size | |
| struct MsgPipeRecvData |
| Data Fields | ||
|---|---|---|
| void * | message | |
| SceSize | size | |
| union SceThreadCpuRegisters.SCE_DEPRECATED_EX |
| Data Fields | ||
|---|---|---|
| struct SceThreadCpuRegisters.SCE_DEPRECATED_EX.__unnamed46__ | __unnamed__ | |
| SceArmCpuRegisters | entry[2] | |
| struct SceThreadCpuRegisters.SCE_DEPRECATED_EX.__unnamed46__ |
| Data Fields | ||
|---|---|---|
| SceArmCpuRegisters | user | Set of registers used for user mode. |
| SceArmCpuRegisters | kernel | Set of registers used for kernel mode. |
| #define ksceKernelGetFaultingProcessInfo | ( | info | ) | ksceKernelGetThreadContextInfo((SceKernelThreadContextInfo*)info) |
| #define ksceKernelDeleteFastMutex | ( | __fast_mutex__ | ) | ksceKernelFinalizeFastMutex((__fast_mutex__)) |
| typedef SceArmCpuRegisters ArmCpuRegisters |
| typedef int(* SceKernelWorkQueueWorkFunction) (void *args) |
Change the current thread vfp exception mask.
| [in] | clear | - The value to clear flag. ORed SCE_KERNEL_VFP_EXCP_* |
| [in] | set | - The value to set flag. ORed SCE_KERNEL_VFP_EXCP_* |
| int ksceKernelCreateCallback | ( | const char * | name, |
| unsigned int | attr, | ||
| SceKernelCallbackFunction | func, | ||
| void * | arg | ||
| ) |
Create callback.
| name | - A textual name for the callback |
| func | - A pointer to a function that will be called as the callback |
| arg | - Argument for the callback ? |
| int ksceKernelDeleteCallback | ( | SceUID | cb | ) |
Delete a callback.
| cb | - The UID of the specified callback |
| int ksceKernelNotifyCallback | ( | SceUID | cb, |
| int | arg2 | ||
| ) |
Notify a callback.
| cb | - The UID of the specified callback |
| arg2 | - Passed as arg2 into the callback function |
| int ksceKernelCancelCallback | ( | SceUID | cb | ) |
Cancel a callback ?
| cb | - The UID of the specified callback |
| int ksceKernelGetCallbackCount | ( | SceUID | cb | ) |
Get the callback count.
| cb | - The UID of the specified callback |
| int ksceKernelCheckCallback | ( | void | ) |
Check callback ?
| SceUID ksceKernelCreateCond | ( | const char * | name, |
| SceUInt | attr, | ||
| SceUID | mutexId, | ||
| const SceKernelCondOptParam * | option | ||
| ) |
Creates a new condition variable.
| name | - Specifies the name of the condition variable |
| attr | - Condition variable attribute flags (normally set to 0) |
| mutexId | - Mutex to be related to the condition variable |
| option | - Condition variable options (normally set to 0) |
| int ksceKernelDeleteCond | ( | SceUID | condId | ) |
Destroy a condition variable.
| condition | variableid - The condition variable id returned from ksceKernelCreateCond |
| int ksceKernelWaitCond | ( | SceUID | condId, |
| unsigned int * | timeout | ||
| ) |
Waits for a signal of a condition variable.
| condId | - The condition variable id returned from ksceKernelCreateCond |
| timeout | - Timeout in microseconds (assumed) |
| int ksceKernelSignalCond | ( | SceUID | condId | ) |
Signals a condition variable.
| condId | - The condition variable id returned from ksceKernelCreateCond |
| int ksceKernelSignalCondAll | ( | SceUID | condId | ) |
Signals a condition variable to all threads waiting for it.
| condId | - The condition variable id returned from ksceKernelCreateCond |
Signals a condition variable to a specific thread waiting for it.
| condId | - The condition variable id returned from ksceKernelCreateCond |
| threadId | - The thread id returned from ksceKernelCreateThread |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x48 | , |
| SceArmCpuRegisters | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x90 | , |
| SceThreadCpuRegisters | |||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 8 | , |
| SceKernelThreadContextInfo | |||
| ) |
Retrieve a list of all threads belonging to a process.
| [in] | pid | The process to query. |
| [out] | ids | The list of thread ids. Can be NULL if output is not required. |
| [in] | n | The max number of thread ids to copy out. |
| [out] | copy_count | The number of thread ids copied. |
| int ksceKernelGetThreadCpuRegisters | ( | SceUID | thid, |
| SceThreadCpuRegisters * | registers | ||
| ) |
Query the state of the registers for a suspended thread.
The registers returned are the user/kernel set for the requested thread. It's not certain that user/kernel is correct representation, instead it could be current/exception. The thread provided must be suspended for this function to succeed.
| [in] | thid | The thread to query. |
| [out] | registers | The set of registers belonging to the thread. |
| int ksceKernelGetThreadContextInfo | ( | SceKernelThreadContextInfo * | pInfo | ) |
Obtain the context information for the thread scheduled on this CPU.
This function can be called from an exception handler to obtain information about the thread that was interrupted.
| [out] | pInfo | Context information of the thread |
| int ksceKernelChangeThreadSuspendStatus | ( | SceUID | thid, |
| int | status | ||
| ) |
Change the thread suspension status to another value.
More research needs to be done to find out exactly what each status actually means. Some examples of useful scenarios: When handling an exception changing the status to 0x1002 (on a newly suspended thread) will stop the kernel rethrowing the same exception. When resuming a suspended thread changing the status to 2 will allow it to resume.
status is 0xF7F03.| [in] | thid | The thread to change. |
| [in] | status | The new status for suspension. |
Get thread PUID from GUID.
| [in] | thid | - The thread global uid. |
| int ksceKernelIsThreadDebugSuspended | ( | SceUID | thid | ) |
Get thread suspend status.
| [in] | thid | - The thread global uid. |
| int ksceKernelDebugSuspendThread | ( | SceUID | thid, |
| int | status | ||
| ) |
Debug suspend a thread.
status is 0xF7F03.| [in] | thid | The thread global uid. |
| [in] | status | The suspend status. |
| int ksceKernelDebugResumeThread | ( | SceUID | thid, |
| int | status | ||
| ) |
Debug resume a thread.
status is 0xF7F03.| [in] | thid | The thread global uid. |
| [in] | status | The suspend status to resume from. |
| int ksceKernelGetThreadInfoForDebugger | ( | SceUID | thid, |
| int | a2, | ||
| void * | pInfo | ||
| ) |
| int ksceKernelGetVfpRegisterForDebugger | ( | SceUID | thid, |
| void * | pVfpRegister | ||
| ) |
| struct SceKernelFaultingProcessInfo SCE_DEPRECATED_EX | ( | SceKernelFaultingProcessInfo | , |
| "This structure has been replaced by SceKernelThreadContextInfo" | |||
| ) |
| int ksceKernelGetEventFlagInfo | ( | SceUID | evfid, |
| SceKernelEventFlagInfo * | info | ||
| ) |
Get event flags info.
| [in] | evfid | - The event flags guid. |
| [out] | info | - The info output buffer pointer. |
| SceUID ksceKernelCreateEventFlag | ( | const char * | name, |
| int | attr, | ||
| int | bits, | ||
| SceKernelEventFlagOptParam * | opt | ||
| ) |
Create an event flag.
| name | - The name of the event flag. |
| attr | - Attributes from SceEventFlagAttributes |
| bits | - Initial bit pattern. |
| opt | - Options, set to NULL |
| int ksceKernelSetEventFlag | ( | SceUID | evfid, |
| unsigned int | bits | ||
| ) |
Set an event flag bit pattern.
| evid | - The event id returned by ksceKernelCreateEventFlag. |
| bits | - The bit pattern to set. |
| int ksceKernelClearEventFlag | ( | SceUID | evfid, |
| unsigned int | bits | ||
| ) |
Clear a event flag bit pattern.
| evid | - The event id returned by ksceKernelCreateEventFlag |
| bits | - The bits to clean |
| int ksceKernelPollEventFlag | ( | SceUID | evfid, |
| unsigned int | bits, | ||
| unsigned int | wait, | ||
| unsigned int * | outBits | ||
| ) |
Poll an event flag for a given bit pattern.
| evid | - The event id returned by ksceKernelCreateEventFlag. |
| bits | - The bit pattern to poll for. |
| wait | - Wait type, one or more of SceEventFlagWaitTypes or'ed together |
| outBits | - The bit pattern that was matched. |
| int ksceKernelWaitEventFlag | ( | SceUID | evfid, |
| unsigned int | bits, | ||
| unsigned int | wait, | ||
| unsigned int * | outBits, | ||
| SceUInt * | timeout | ||
| ) |
Wait for an event flag for a given bit pattern.
| evid | - The event id returned by ksceKernelCreateEventFlag. |
| bits | - The bit pattern to poll for. |
| wait | - Wait type, one or more of SceEventFlagWaitTypes or'ed together |
| outBits | - The bit pattern that was matched. |
| timeout | - Timeout in microseconds |
| int ksceKernelWaitEventFlagCB | ( | SceUID | evfid, |
| unsigned int | bits, | ||
| unsigned int | wait, | ||
| unsigned int * | outBits, | ||
| SceUInt * | timeout | ||
| ) |
Wait for an event flag for a given bit pattern with callback.
| evid | - The event id returned by ksceKernelCreateEventFlag. |
| bits | - The bit pattern to poll for. |
| wait | - Wait type, one or more of SceEventFlagWaitTypes or'ed together |
| outBits | - The bit pattern that was matched. |
| timeout | - Timeout in microseconds |
| int ksceKernelDeleteEventFlag | ( | SceUID | evfid | ) |
Delete an event flag.
| evid | - The event id returned by ksceKernelCreateEventFlag. |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x40 | , |
| SceKernelFastMutex | |||
| ) |
| int ksceKernelInitializeFastMutex | ( | SceKernelFastMutex * | fast_mutex, |
| const char * | name, | ||
| int | attr, | ||
| void * | opt | ||
| ) |
| int ksceKernelFinalizeFastMutex | ( | SceKernelFastMutex * | fast_mutex | ) |
| int ksceKernelLockFastMutex | ( | SceKernelFastMutex * | fast_mutex | ) |
| int ksceKernelTryLockFastMutex | ( | SceKernelFastMutex * | fast_mutex | ) |
| int ksceKernelUnlockFastMutex | ( | SceKernelFastMutex * | fast_mutex | ) |
| int ksceKernelGetFastMutexInfo | ( | SceKernelFastMutex * | fast_mutex, |
| void * | info | ||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x38 | , |
| SceKernelLwCondInfo | |||
| ) |
| int ksceKernelGetLwCondInfo | ( | SceUID | lwcond_id, |
| SceKernelLwCondInfo * | info | ||
| ) |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x40 | , |
| SceKernelLwMutexInfo | |||
| ) |
| int ksceKernelGetLwMutexInfo | ( | SceUID | lwmtxid, |
| SceKernelLwMutexInfo * | info | ||
| ) |
| SceKernelIdListType ksceKernelGetThreadmgrUIDClass | ( | SceUID | uid | ) |
Get the type of a Threadmgr uid.
| uid | - The uid to get the type from |
| SceUInt32 ksceKernelGetSystemTimeLow | ( | void | ) |
Get the system time.
| SceInt64 ksceKernelGetSystemTimeWide | ( | void | ) |
Get the system time (wide version)
| void * ksceKernelGetThreadTLSAddr | ( | SceUID | thid, |
| int | key | ||
| ) |
ksceKernelGetThreadTLSAddr gets an address to a 4 bytes area of TLS memory for the specified thread
| thid | - The UID of the thread to access TLS |
| key | - the TLS keyslot index |
| void * ksceKernelGetTLSAddr | ( | int | key | ) |
ksceKernelGetTLSAddr get pointer to TLS key area for current thread
| key | - the TLS keyslot index |
| int ksceKernelSetPermission | ( | int | value | ) |
Set Permission.
| [in] | value | - The new permission |
| SceUID ksceKernelGetProcessId | ( | void | ) |
Gets the current process PID.
| SceUID ksceKernelGetProcessIdFromTLS | ( | void | ) |
Get Process id from Thread Local Storage.
Set Process id to Thread Local Storage.
| [in] | value | - The new process id |
| int ksceKernelRunWithStack | ( | SceSize | stack_size, |
| int(*)(void *) | to_call, | ||
| void * | args | ||
| ) |
Runs a function with larger stack size.
| [in] | stack_size | The stack size |
| [in] | to_call | To call |
| args | The arguments |
| VITASDK_BUILD_ASSERT_EQ | ( | 0x3C | , |
| SceKernelMsgPipeInfo | |||
| ) |
| int ksceKernelGetMsgPipeInfo | ( | SceUID | msgpipe_id, |
| SceKernelMsgPipeInfo * | info | ||
| ) |
Get msgpipe info.
| [in] | msgpipe_id | - The msg pipe guid. |
| [out] | info | - The info output buffer pointer. |
| SceUID ksceKernelCreateMsgPipe | ( | const char * | name, |
| int | type, | ||
| int | attr, | ||
| SceSize | bufSize, | ||
| void * | opt | ||
| ) |
Create a message pipe.
| name | - Name of the pipe |
| type | - The type of memory attribute to use internally (set to 0x40) |
| attr | - Set to 12 |
| bufSize | - The size of the internal buffer in multiples of 0x1000 (4KB) |
| opt | - Message pipe options (set to NULL) |
| int ksceKernelDeleteMsgPipe | ( | SceUID | uid | ) |
Delete a message pipe.
| uid | - The UID of the pipe |
| int ksceKernelSendMsgPipeVector | ( | SceUID | uid, |
| const MsgPipeSendData * | v, | ||
| unsigned int | n, | ||
| int | unk1, | ||
| void * | unk2, | ||
| unsigned int * | timeout | ||
| ) |
Send a message to a pipe.
| uid | - The UID of the pipe |
| message | - Pointer to the message |
| size | - Size of the message |
| unk1 | - Unknown - async vs sync? use 0 for sync |
| unk2 | - Unknown - use NULL |
| timeout | - Timeout for send in us. use NULL to wait indefinitely |
| int ksceKernelTrySendMsgPipeVector | ( | SceUID | uid, |
| const MsgPipeSendData * | v, | ||
| SceSize | size, | ||
| int | unk1, | ||
| void * | unk2 | ||
| ) |
Try to send a message to a pipe.
| uid | - The UID of the pipe |
| message | - Pointer to the message |
| size | - Size of the message |
| unk1 | - Unknown - use 0 |
| unk2 | - Unknown - use NULL |
| int ksceKernelReceiveMsgPipeVector | ( | SceUID | uid, |
| const MsgPipeRecvData * | v, | ||
| unsigned int | n, | ||
| int | unk1, | ||
| void * | unk2, | ||
| unsigned int * | timeout | ||
| ) |
Receive a message from a pipe.
| uid | - The UID of the pipe |
| message | - Pointer to the message |
| size | - Size of the message |
| unk1 | - Unknown - async vs sync? use 0 for sync |
| unk2 | - Unknown - use NULL |
| timeout | - Timeout for receive in us. use NULL to wait indefinitely |
| int ksceKernelTryReceiveMsgPipeVector | ( | SceUID | uid, |
| const MsgPipeRecvData * | v, | ||
| SceSize | size, | ||
| int | unk1, | ||
| void * | unk2 | ||
| ) |
Receive a message from a pipe.
| uid | - The UID of the pipe |
| message | - Pointer to the message |
| size | - Size of the message |
| unk1 | - Unknown - use 0 |
| unk2 | - Unknown - use NULL |
| int ksceKernelCancelMsgPipe | ( | SceUID | uid, |
| int * | psend, | ||
| int * | precv | ||
| ) |
Cancel a message pipe.
| uid | - UID of the pipe to cancel |
| psend | - Receive number of sending threads, NULL is valid |
| precv | - Receive number of receiving threads, NULL is valid |
| SceUID ksceKernelCreateMutex | ( | const char * | name, |
| SceUInt | attr, | ||
| int | initCount, | ||
| SceKernelMutexOptParam * | option | ||
| ) |
Creates a new mutex.
| name | - Specifies the name of the mutex |
| attr | - Mutex attribute flags (normally set to 0) |
| initCount | - Mutex initial value |
| option | - Mutex options (normally set to 0) |
| int ksceKernelDeleteMutex | ( | SceUID | mutexid | ) |
Destroy a mutex.
| mutexid | - The mutex id returned from ksceKernelCreateMutex |
| int ksceKernelLockMutex | ( | SceUID | mutexid, |
| int | lockCount, | ||
| unsigned int * | timeout | ||
| ) |
Lock a mutex.
| mutexid | - The mutex id returned from ksceKernelCreateMutex |
| lockCount | - The value to increment to the lock count of the mutex |
| timeout | - Timeout in microseconds (assumed) |
| int ksceKernelTryLockMutex | ( | SceUID | mutexid, |
| int | lockCount | ||
| ) |
Try to lock a mutex (non-blocking)
| mutexid | - The mutex id returned from ksceKernelCreateMutex |
| lockCount | - The value to increment to the lock count of the mutex |
| int ksceKernelUnlockMutex | ( | SceUID | mutexid, |
| int | unlockCount | ||
| ) |
Try to unlock a mutex (non-blocking)
| mutexid | - The mutex id returned from ksceKernelCreateMutex |
| unlockCount | - The value to decrement to the lock count of the mutex |
| int ksceKernelCancelMutex | ( | SceUID | mutexid, |
| int | newCount, | ||
| int * | numWaitThreads | ||
| ) |
Cancels a mutex.
| mutexid | - The mutex id returned from ksceKernelCreateMutex |
| newCount | - The new lock count of the mutex |
| numWaitThreads | - Number of threads waiting for the mutex |
| int ksceKernelGetMutexInfo | ( | SceUID | mutexid, |
| SceKernelMutexInfo * | info | ||
| ) |
Retrieve information about a mutex.
| mutexid | - UID of the mutex to retrieve info for. |
| info | - Pointer to a SceKernelMutexInfo struct to receive the info. |
| int ksceKernelGetSemaInfo | ( | SceUID | semaid, |
| SceKernelSemaInfo * | info | ||
| ) |
Get semaphore info.
| [in] | semaid | - The semaphore guid. |
| [out] | info | - The info output buffer pointer. |
| SceUID ksceKernelCreateSema | ( | const char * | name, |
| SceUInt | attr, | ||
| int | initVal, | ||
| int | maxVal, | ||
| SceKernelSemaOptParam * | option | ||
| ) |
Creates a new semaphore.
| name | - Specifies the name of the sema |
| attr | - Sema attribute flags (normally set to 0) |
| initVal | - Sema initial value |
| maxVal | - Sema maximum value |
| option | - Sema options (normally set to 0) |
| int ksceKernelDeleteSema | ( | SceUID | semaid | ) |
Destroy a semaphore.
| semaid | - The semaid returned from a previous create call. |
| int ksceKernelSignalSema | ( | SceUID | semaid, |
| int | signal | ||
| ) |
Send a signal to a semaphore.
| semaid | - The sema id returned from ksceKernelCreateSema |
| signal | - The amount to signal the sema (i.e. if 2 then increment the sema by 2) |
Lock a semaphore.
| semaid | - The sema id returned from ksceKernelCreateSema |
| signal | - The value to wait for (i.e. if 1 then wait till reaches a signal state of 1) |
| timeout | - Timeout in microseconds (assumed). |
| int ksceKernelPollSema | ( | SceUID | semaid, |
| int | signal | ||
| ) |
Poll a semaphore.
| semaid | - UID of the semaphore to poll. |
| signal | - The value to test for. |
| SceUID ksceKernelCreateThread | ( | const char * | name, |
| SceKernelThreadEntry | entry, | ||
| int | initPriority, | ||
| SceSize | stackSize, | ||
| SceUInt | attr, | ||
| int | cpuAffinityMask, | ||
| const SceKernelThreadOptParam * | option | ||
| ) |
Create a thread.
| name | - An arbitrary thread name. |
| entry | - The thread function to run when started. |
| initPriority | - The initial priority of the thread. Less if higher priority. |
| stackSize | - The size of the initial stack. |
| attr | - The thread attributes, zero or more of ::SceThreadAttributes. |
| cpuAffinityMask | - The CPU affinity mask |
| option | - Additional options specified by SceKernelThreadOptParam. |
| int ksceKernelDeleteThread | ( | SceUID | thid | ) |
Delate a thread.
| thid | - UID of the thread to be deleted. |
Start a created thread.
| thid | - Thread id from ksceKernelCreateThread |
| arglen | - Length of the data pointed to by argp, in bytes |
| argp | - Pointer to the arguments. |
| int ksceKernelExitThread | ( | int | status | ) |
Exit a thread.
| status | - Exit status. |
| int ksceKernelExitDeleteThread | ( | int | status | ) |
Exit a thread and delete itself.
| status | - Exit status |
Wait until a thread has ended.
| thid | - Id of the thread to wait for. |
| stat | - Exit status. |
| timeout | - Timeout in microseconds (assumed). |
Wait until a thread has ended and handle callbacks if necessary.
| thid | - Id of the thread to wait for. |
| stat | - Exit status. |
| timeout | - Timeout in microseconds (assumed). |
| int ksceKernelDelayThread | ( | SceUInt | delay | ) |
Delay the current thread by a specified number of microseconds.
| delay | - Delay in microseconds. |
| int ksceKernelDelayThreadCB | ( | SceUInt | delay | ) |
Delay the current thread by a specified number of microseconds and handle any callbacks.
| delay | - Delay in microseconds. |
| int ksceKernelChangeThreadPriority | ( | SceUID | thid, |
| int | priority | ||
| ) |
Change the threads current priority.
| thid | - The ID of the thread (from ksceKernelCreateThread or ksceKernelGetThreadId) |
| priority | - The new priority (the lower the number the higher the priority) |
| int ksceKernelGetThreadId | ( | void | ) |
Get the current thread Id.
| int ksceKernelGetThreadCurrentPriority | ( | void | ) |
Get the current priority of the thread you are in.
| int ksceKernelGetThreadStackFreeSize | ( | SceUID | thid | ) |
Get the free stack size for a thread.
| thid | - The thread ID |
| int ksceKernelGetThreadInfo | ( | SceUID | thid, |
| SceKernelThreadInfo * | info | ||
| ) |
Get the thread info by thread id.
| thid | - The thread id for get info. |
| info | - The info output. |
Change the current thread vfp exception mask.
| [in] | clear | - The value to clear flag. ORed SCE_KERNEL_VFP_EXCP_* |
| [in] | set | - The value to set flag. ORed SCE_KERNEL_VFP_EXCP_* |
| int ksceKernelEnqueueWorkQueue | ( | SceUID | uid, |
| const char * | name, | ||
| SceKernelWorkQueueWorkFunction | work, | ||
| void * | args | ||
| ) |
Enqueue work to a workqueue.
| [in] | uid | UID of the workqueue (0x10023 for the SceKernelGlobalWorkQueue) |
| [in] | name | Name of the work to enqueue |
| [in] | work | Work function to enqueue |
| [in] | args | Argument to pass to the work function |
| uint32_t SceArmCpuRegisters::r0 |
| uint32_t SceArmCpuRegisters::r1 |
| uint32_t SceArmCpuRegisters::r2 |
| uint32_t SceArmCpuRegisters::r3 |
| uint32_t SceArmCpuRegisters::r4 |
| uint32_t SceArmCpuRegisters::r5 |
| uint32_t SceArmCpuRegisters::r6 |
| uint32_t SceArmCpuRegisters::r7 |
| uint32_t SceArmCpuRegisters::r8 |
| uint32_t SceArmCpuRegisters::r9 |
| uint32_t SceArmCpuRegisters::r10 |
| uint32_t SceArmCpuRegisters::r11 |
| uint32_t SceArmCpuRegisters::r12 |
| uint32_t SceArmCpuRegisters::sp |
| uint32_t SceArmCpuRegisters::lr |
| uint32_t SceArmCpuRegisters::pc |
| uint32_t SceArmCpuRegisters::cpsr |
| uint32_t SceArmCpuRegisters::fpscr |
| SceArmCpuRegisters { ... } ::user |
Set of registers used for user mode.
| SceArmCpuRegisters { ... } ::kernel |
Set of registers used for kernel mode.
| struct { ... } SceThreadCpuRegisters |
| SceArmCpuRegisters { ... } ::entry[2] |
| union { ... } SceThreadCpuRegisters::SCE_DEPRECATED_EX |
| ScePID SceKernelThreadContextInfo::process_id |
| SceUID SceKernelThreadContextInfo::thread_id |
| SceUID SceKernelFaultingProcessInfo::pid |
| SceUID SceKernelFaultingProcessInfo::faultingThreadId |
| SceUID pid |
| SceUID faultingThreadId |
| SceUInt8 SceKernelFastMutex::data[0x40] |
| SceSize SceKernelLwCondInfo::size |
| SceUID SceKernelLwCondInfo::lwcond_id |
| char SceKernelLwCondInfo::name[0x20] |
| int SceKernelLwCondInfo::attr |
| SceKernelLwCondWork* SceKernelLwCondInfo::work |
| SceKernelLwMutexWork* SceKernelLwCondInfo::lwmutex |
| int SceKernelLwCondInfo::num_wait_threads |
| SceSize SceKernelLwMutexInfo::size |
| SceUID SceKernelLwMutexInfo::mtxid |
| char SceKernelLwMutexInfo::name[0x20] |
| int SceKernelLwMutexInfo::attr |
| SceKernelLwMutexWork* SceKernelLwMutexInfo::work |
| int SceKernelLwMutexInfo::init_count |
| int SceKernelLwMutexInfo::current_count |
| SceUID SceKernelLwMutexInfo::current_owner_id |
| SceUInt32 SceKernelLwMutexInfo::num_wait_threads |
| SceSize SceKernelMsgPipeInfo::size |
| SceUID SceKernelMsgPipeInfo::msgpipe_id |
| char SceKernelMsgPipeInfo::name[0x20] |
| int SceKernelMsgPipeInfo::attr |
| SceSize SceKernelMsgPipeInfo::buffer_size |
| SceSize SceKernelMsgPipeInfo::free_size |
| int SceKernelMsgPipeInfo::num_send_wait_threads |
| int SceKernelMsgPipeInfo::num_receive_wait_threads |
| const void* MsgPipeSendData::message |
| SceSize MsgPipeSendData::size |
| void* MsgPipeRecvData::message |
| SceSize MsgPipeRecvData::size |