vitasdk
Documentation of the vitasdk
|
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:
Functions | |
int | ksceKernelCreateCallback (const char *name, unsigned int attr, SceKernelCallbackFunction func, void *arg) |
Create callback. More... | |
int | ksceKernelDeleteCallback (SceUID cb) |
Delete a callback. More... | |
int | ksceKernelNotifyCallback (SceUID cb, int arg2) |
Notify a callback. More... | |
int | ksceKernelCancelCallback (SceUID cb) |
Cancel a callback ? More... | |
int | ksceKernelGetCallbackCount (SceUID cb) |
Get the callback count. More... | |
int | ksceKernelCheckCallback (void) |
Check callback ? More... | |
SceUID | ksceKernelCreateCond (const char *name, SceUInt attr, SceUID mutexId, const SceKernelCondOptParam *option) |
Creates a new condition variable. More... | |
int | ksceKernelDeleteCond (SceUID condId) |
Destroy a condition variable. More... | |
int | ksceKernelWaitCond (SceUID condId, unsigned int *timeout) |
Waits for a signal of a condition variable. More... | |
int | ksceKernelSignalCond (SceUID condId) |
Signals a condition variable. More... | |
int | ksceKernelSignalCondAll (SceUID condId) |
Signals a condition variable to all threads waiting for it. More... | |
int | ksceKernelSignalCondTo (SceUID condId, SceUID threadId) |
Signals a condition variable to a specific thread waiting for it. More... | |
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. More... | |
int | ksceKernelGetThreadCpuRegisters (SceUID thid, SceThreadCpuRegisters *registers) |
Query the state of the registers for a suspended thread. More... | |
int | ksceKernelGetThreadContextInfo (SceKernelThreadContextInfo *pInfo) |
Obtain the context information for the thread scheduled on this CPU. More... | |
int | ksceKernelChangeThreadSuspendStatus (SceUID thid, int status) |
Change the thread suspension status to another value. More... | |
SceUID | ksceKernelGetUserThreadId (SceUID thid) |
Get thread PUID from GUID. More... | |
int | ksceKernelIsThreadDebugSuspended (SceUID thid) |
Get thread suspend status. More... | |
int | ksceKernelDebugSuspendThread (SceUID thid, int status) |
Debug suspend a thread. More... | |
int | ksceKernelDebugResumeThread (SceUID thid, int status) |
Debug resume a thread. More... | |
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. More... | |
SceUID | ksceKernelCreateEventFlag (const char *name, int attr, int bits, SceKernelEventFlagOptParam *opt) |
Create an event flag. More... | |
int | ksceKernelSetEventFlag (SceUID evfid, unsigned int bits) |
Set an event flag bit pattern. More... | |
int | ksceKernelClearEventFlag (SceUID evfid, unsigned int bits) |
Clear a event flag bit pattern. More... | |
int | ksceKernelPollEventFlag (SceUID evfid, unsigned int bits, unsigned int wait, unsigned int *outBits) |
Poll an event flag for a given bit pattern. More... | |
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. More... | |
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. More... | |
int | ksceKernelDeleteEventFlag (SceUID evfid) |
Delete an event flag. More... | |
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. More... | |
SceUInt32 | ksceKernelGetSystemTimeLow (void) |
Get the system time. More... | |
SceInt64 | ksceKernelGetSystemTimeWide (void) |
Get the system time (wide version) More... | |
void * | ksceKernelGetThreadTLSAddr (SceUID thid, int key) |
ksceKernelGetThreadTLSAddr gets an address to a 4 bytes area of TLS memory for the specified thread More... | |
void * | ksceKernelGetTLSAddr (int key) |
ksceKernelGetTLSAddr get pointer to TLS key area for current thread More... | |
int | ksceKernelSetPermission (int value) |
Set Permission. More... | |
SceUID | ksceKernelGetProcessId (void) |
Gets the current process PID. More... | |
SceUID | ksceKernelGetProcessIdFromTLS (void) |
Get Process id from Thread Local Storage. More... | |
SceUID | ksceKernelSetProcessIdToTLS (SceUID pid) |
Set Process id to Thread Local Storage. More... | |
int | ksceKernelRunWithStack (SceSize stack_size, int(*to_call)(void *), void *args) |
Runs a function with larger stack size. More... | |
VITASDK_BUILD_ASSERT_EQ (0x3C, SceKernelMsgPipeInfo) | |
int | ksceKernelGetMsgPipeInfo (SceUID msgpipe_id, SceKernelMsgPipeInfo *info) |
Get msgpipe info. More... | |
SceUID | ksceKernelCreateMsgPipe (const char *name, int type, int attr, SceSize bufSize, void *opt) |
Create a message pipe. More... | |
int | ksceKernelDeleteMsgPipe (SceUID uid) |
Delete a message pipe. More... | |
int | ksceKernelSendMsgPipeVector (SceUID uid, const MsgPipeSendData *v, unsigned int n, int unk1, void *unk2, unsigned int *timeout) |
Send a message to a pipe. More... | |
int | ksceKernelTrySendMsgPipeVector (SceUID uid, const MsgPipeSendData *v, SceSize size, int unk1, void *unk2) |
Try to send a message to a pipe. More... | |
int | ksceKernelReceiveMsgPipeVector (SceUID uid, const MsgPipeRecvData *v, unsigned int n, int unk1, void *unk2, unsigned int *timeout) |
Receive a message from a pipe. More... | |
int | ksceKernelTryReceiveMsgPipeVector (SceUID uid, const MsgPipeRecvData *v, SceSize size, int unk1, void *unk2) |
Receive a message from a pipe. More... | |
int | ksceKernelCancelMsgPipe (SceUID uid, int *psend, int *precv) |
Cancel a message pipe. More... | |
SceUID | ksceKernelCreateMutex (const char *name, SceUInt attr, int initCount, SceKernelMutexOptParam *option) |
Creates a new mutex. More... | |
int | ksceKernelDeleteMutex (SceUID mutexid) |
Destroy a mutex. More... | |
int | ksceKernelLockMutex (SceUID mutexid, int lockCount, unsigned int *timeout) |
Lock a mutex. More... | |
int | ksceKernelTryLockMutex (SceUID mutexid, int lockCount) |
Try to lock a mutex (non-blocking) More... | |
int | ksceKernelUnlockMutex (SceUID mutexid, int unlockCount) |
Try to unlock a mutex (non-blocking) More... | |
int | ksceKernelCancelMutex (SceUID mutexid, int newCount, int *numWaitThreads) |
Cancels a mutex. More... | |
int | ksceKernelGetMutexInfo (SceUID mutexid, SceKernelMutexInfo *info) |
Retrieve information about a mutex. More... | |
int | ksceKernelGetSemaInfo (SceUID semaid, SceKernelSemaInfo *info) |
Get semaphore info. More... | |
SceUID | ksceKernelCreateSema (const char *name, SceUInt attr, int initVal, int maxVal, SceKernelSemaOptParam *option) |
Creates a new semaphore. More... | |
int | ksceKernelDeleteSema (SceUID semaid) |
Destroy a semaphore. More... | |
int | ksceKernelSignalSema (SceUID semaid, int signal) |
Send a signal to a semaphore. More... | |
int | ksceKernelWaitSema (SceUID semaid, int signal, SceUInt *timeout) |
Lock a semaphore. More... | |
int | ksceKernelPollSema (SceUID semaid, int signal) |
Poll a semaphore. More... | |
SceUID | ksceKernelCreateThread (const char *name, SceKernelThreadEntry entry, int initPriority, SceSize stackSize, SceUInt attr, int cpuAffinityMask, const SceKernelThreadOptParam *option) |
Create a thread. More... | |
int | ksceKernelDeleteThread (SceUID thid) |
Delate a thread. More... | |
int | ksceKernelStartThread (SceUID thid, SceSize arglen, void *argp) |
Start a created thread. More... | |
int | ksceKernelExitThread (int status) |
Exit a thread. More... | |
int | ksceKernelExitDeleteThread (int status) |
Exit a thread and delete itself. More... | |
int | ksceKernelWaitThreadEnd (SceUID thid, int *stat, SceUInt *timeout) |
Wait until a thread has ended. More... | |
int | ksceKernelWaitThreadEndCB (SceUID thid, int *stat, SceUInt *timeout) |
Wait until a thread has ended and handle callbacks if necessary. More... | |
int | ksceKernelDelayThread (SceUInt delay) |
Delay the current thread by a specified number of microseconds. More... | |
int | ksceKernelDelayThreadCB (SceUInt delay) |
Delay the current thread by a specified number of microseconds and handle any callbacks. More... | |
int | ksceKernelChangeThreadPriority (SceUID thid, int priority) |
Change the threads current priority. More... | |
int | ksceKernelGetThreadId (void) |
Get the current thread Id. More... | |
int | ksceKernelGetThreadCurrentPriority (void) |
Get the current priority of the thread you are in. More... | |
int | ksceKernelGetThreadStackFreeSize (SceUID thid) |
Get the free stack size for a thread. More... | |
int | ksceKernelGetThreadInfo (SceUID thid, SceKernelThreadInfo *info) |
Get the thread info by thread id. More... | |
int | ksceKernelEnqueueWorkQueue (SceUID uid, const char *name, SceKernelWorkQueueWorkFunction work, void *args) |
Enqueue work to a workqueue. More... | |
Typedefs | |
typedef SceArmCpuRegisters | ArmCpuRegisters |
typedef SceThreadCpuRegisters | ThreadCpuRegisters |
typedef int(* | SceKernelWorkQueueWorkFunction) (void *args) |
Macros | |
#define | ksceKernelGetFaultingProcessInfo(info) ksceKernelGetThreadContextInfo((SceKernelThreadContextInfo*)info) |
#define | ksceKernelDeleteFastMutex(__fast_mutex__) ksceKernelFinalizeFastMutex((__fast_mutex__)) |
struct SceArmCpuRegisters |
struct SceThreadCpuRegisters |
Structure containing a threads register states.
Data Fields | ||
---|---|---|
union SceThreadCpuRegisters | 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 | ||
---|---|---|
SCE_DEPRECATED_EX | __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) |
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. |
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 |