vitasdk
Documentation of the vitasdk

Exports for User. More...

Data Structures

struct  SceLibkernelAddresses
 

Functions

int sceKernelExitProcess (int res)
 Exit current Process with specified return code.
 
int sceKernelPowerTick (SceKernelPowerTickType type)
 Cancel specified idle timers to prevent entering in power save processing.
 
int sceKernelPowerLock (SceKernelPowerTickType type)
 Locks certain timers from triggering.
 
int sceKernelPowerUnlock (SceKernelPowerTickType type)
 Unlocks certain timers.
 
int sceKernelGetProcessTime (SceKernelSysClock *pSysClock)
 Get the process time of the current process.
 
SceUInt32 sceKernelGetProcessTimeLow (void)
 Get the lower 32 bits part of process time of the current process.
 
SceUInt64 sceKernelGetProcessTimeWide (void)
 Get the process time of the current process.
 
SceUID sceKernelGetCurrentProcess (void)
 
SceInt32 sceKernelGetRemoteProcessTime (SceUID processId, SceKernelSysClock *pClock)
 
SceUID sceKernelGetStderr (void)
 
SceUID sceKernelGetStdin (void)
 
SceUID sceKernelGetStdout (void)
 
const void * sceKernelGetProcessParam (void)
 
SceKernelClock sceKernelLibcClock (void)
 
SceKernelTime sceKernelLibcTime (SceKernelTime *tloc)
 
int sceKernelLibcGettimeofday (SceKernelTimeval *tv, SceKernelTimezone *tz)
 
 VITASDK_BUILD_ASSERT_EQ (0x1C, SceLibkernelAddresses)
 
 __attribute__ ((__noreturn__)) int _sceKernelExitProcessForUser(SceInt32 exit_status)
 Terminates the calling process through the raw user export.
 
int _sceKernelRegisterLibkernelAddresses (const SceLibkernelAddresses *addresses)
 Registers LibKernel's process-exit trampolines and addresses of cached values.
 
int sceKernelGetProcessTimeCore (SceKernelSysClock *time)
 Gets the calling process's elapsed time in microseconds.
 
SceUInt32 sceKernelGetProcessTimeLowCore (void)
 
SceKernelSysClock sceKernelGetProcessTimeWideCore (void)
 
SceBool sceKernelIsCDialogAvailable (void)
 Tests whether the current process budget reserves common-dialog memory.
 
SceBool sceKernelIsGameBudget (void)
 
SceInt32 sceKernelRegisterProcessTerminationCallback (ScePID pid, SceUID callback_id)
 Registers a callback to be notified when a process object is destroyed.
 
SceInt32 sceKernelUnregisterProcessTerminationCallback (ScePID pid, SceUID callback_id)
 Unregisters one matching process-termination callback registration.
 

Variables

SceSize SceLibkernelAddresses::size
 Must be 0x1C on FW 3.60.
 
int(* SceLibkernelAddresses::sce_kernel_exit_thread )(int exit_status)
 Exit-thread trampoline.
 
int(* SceLibkernelAddresses::sce_kernel_exit_delete_thread )(int exit_status)
 Exit-and-delete-thread trampoline.
 
int(* SceLibkernelAddresses::_sce_kernel_exit_callback )(void)
 Exit-callback trampoline.
 
SceKernelThreadEntry SceLibkernelAddresses::coredump_handler
 User coredump-thread entry point.
 
SceKernelSysClock * SceLibkernelAddresses::process_time
 LibKernel process-time base initialized during registration.
 
SceUInt32 * SceLibkernelAddresses::pmuserenr
 LibKernel PMUSERENR cache updated by Processmgr.
 

Detailed Description

Exports for User.


Using this library in your project

Include the header file in your project:


Link the library to the executable:

SceProcessmgr_stub




Data Structure Documentation

◆ SceLibkernelAddresses

struct SceLibkernelAddresses

Data Fields

SceSize size
 Must be 0x1C on FW 3.60.
 
int(* sce_kernel_exit_thread )(int exit_status)
 Exit-thread trampoline.
 
int(* sce_kernel_exit_delete_thread )(int exit_status)
 Exit-and-delete-thread trampoline.
 
int(* _sce_kernel_exit_callback )(void)
 Exit-callback trampoline.
 
SceKernelThreadEntry coredump_handler
 User coredump-thread entry point.
 
SceKernelSysClock * process_time
 LibKernel process-time base initialized during registration.
 
SceUInt32 * pmuserenr
 LibKernel PMUSERENR cache updated by Processmgr.
 

Function Documentation

◆ sceKernelExitProcess()

int sceKernelExitProcess ( int  res)

Exit current Process with specified return code.

Parameters
[in]res- Exit code to return
Returns
0 on success, < 0 on error.

◆ sceKernelPowerTick()

int sceKernelPowerTick ( SceKernelPowerTickType  type)

Cancel specified idle timers to prevent entering in power save processing.

Parameters
[in]type- One of SceKernelPowerTickType
Returns
0

◆ sceKernelPowerLock()

int sceKernelPowerLock ( SceKernelPowerTickType  type)

Locks certain timers from triggering.

Parameters
[in]type- One of SceKernelPowerTickType
Returns
0

◆ sceKernelPowerUnlock()

int sceKernelPowerUnlock ( SceKernelPowerTickType  type)

Unlocks certain timers.

Parameters
[in]type- One of SceKernelPowerTickType
Returns
0

◆ sceKernelGetProcessTime()

int sceKernelGetProcessTime ( SceKernelSysClock *  pSysClock)

Get the process time of the current process.

Parameters
[out]pSysClock- Pointer to a SceKernelSysClock value which will receive the process time.
Returns
0 on success, < 0 on error.

◆ sceKernelGetProcessTimeLow()

SceUInt32 sceKernelGetProcessTimeLow ( void  )

Get the lower 32 bits part of process time of the current process.

Returns
process time of the current process

◆ sceKernelGetProcessTimeWide()

SceUInt64 sceKernelGetProcessTimeWide ( void  )

Get the process time of the current process.

Returns
process time of the current process

◆ sceKernelGetCurrentProcess()

SceUID sceKernelGetCurrentProcess ( void  )

◆ sceKernelGetRemoteProcessTime()

SceInt32 sceKernelGetRemoteProcessTime ( SceUID  processId,
SceKernelSysClock *  pClock 
)

◆ sceKernelGetStderr()

SceUID sceKernelGetStderr ( void  )

◆ sceKernelGetStdin()

SceUID sceKernelGetStdin ( void  )

◆ sceKernelGetStdout()

SceUID sceKernelGetStdout ( void  )

◆ sceKernelGetProcessParam()

const void * sceKernelGetProcessParam ( void  )

◆ sceKernelLibcClock()

SceKernelClock sceKernelLibcClock ( void  )

◆ sceKernelLibcTime()

SceKernelTime sceKernelLibcTime ( SceKernelTime *  tloc)

◆ sceKernelLibcGettimeofday()

int sceKernelLibcGettimeofday ( SceKernelTimeval *  tv,
SceKernelTimezone *  tz 
)

◆ VITASDK_BUILD_ASSERT_EQ()

VITASDK_BUILD_ASSERT_EQ ( 0x1C  ,
SceLibkernelAddresses   
)

◆ __attribute__()

__attribute__ ( (__noreturn__)  )

Terminates the calling process through the raw user export.

Parameters
[in]exit_statusProcess exit status.
Returns
This function does not return.

◆ _sceKernelRegisterLibkernelAddresses()

int _sceKernelRegisterLibkernelAddresses ( const SceLibkernelAddresses *  addresses)

Registers LibKernel's process-exit trampolines and addresses of cached values.

FW 3.60 copies exactly 0x1C bytes and requires SceLibkernelAddresses::size to equal 0x1C. A registered non-NULL address is not replaced by a later call. The process object stores the six addresses; the functions and storage they point to must remain valid for the process lifetime.

On FW 3.60, a failure to initialize the user process_time destination is not returned to the caller. That failure also prevents pmuserenr from being registered by the same call.

Parameters
[in]addressesNon-NULL registration block.
Returns
0 on success, or < 0 on error.

◆ sceKernelGetProcessTimeCore()

int sceKernelGetProcessTimeCore ( SceKernelSysClock *  time)

Gets the calling process's elapsed time in microseconds.

Parameters
[out]timeNon-NULL output for the elapsed time as a SceKernelSysClock value.
Returns
0 on success, or < 0 on error.

◆ sceKernelGetProcessTimeLowCore()

SceUInt32 sceKernelGetProcessTimeLowCore ( void  )
Returns
The wrapping low 32 bits of the calling process's elapsed time in microseconds.

◆ sceKernelGetProcessTimeWideCore()

SceKernelSysClock sceKernelGetProcessTimeWideCore ( void  )
Returns
The calling process's elapsed time in microseconds.

◆ sceKernelIsCDialogAvailable()

SceBool sceKernelIsCDialogAvailable ( void  )

Tests whether the current process budget reserves common-dialog memory.

Returns
1 when available, 0 when unavailable, or < 0 on error.

◆ sceKernelIsGameBudget()

SceBool sceKernelIsGameBudget ( void  )
Returns
1 when the calling process uses the built-in full-game budget descriptor, otherwise 0.

◆ sceKernelRegisterProcessTerminationCallback()

SceInt32 sceKernelRegisterProcessTerminationCallback ( ScePID  pid,
SceUID  callback_id 
)

Registers a callback to be notified when a process object is destroyed.

The callback receives the target process ID as its notification argument. The callback must remain valid until it is unregistered or the target process is destroyed. Registering the same pair again creates another registration; each unregister call removes one matching registration.

Parameters
[in]pidNonzero target process ID.
[in]callback_idNonzero callback PUID owned by the calling process.
Returns
0 on success, or < 0 on error.

◆ sceKernelUnregisterProcessTerminationCallback()

SceInt32 sceKernelUnregisterProcessTerminationCallback ( ScePID  pid,
SceUID  callback_id 
)

Unregisters one matching process-termination callback registration.

Parameters
[in]pidNonzero target process ID.
[in]callback_idNonzero previously registered callback PUID.
Returns
0 on success, or < 0 on error.

Variable Documentation

◆ size

SceSize SceLibkernelAddresses::size

Must be 0x1C on FW 3.60.

◆ sce_kernel_exit_thread

int(* SceLibkernelAddresses::sce_kernel_exit_thread) (int exit_status)

Exit-thread trampoline.

◆ sce_kernel_exit_delete_thread

int(* SceLibkernelAddresses::sce_kernel_exit_delete_thread) (int exit_status)

Exit-and-delete-thread trampoline.

◆ _sce_kernel_exit_callback

int(* SceLibkernelAddresses::_sce_kernel_exit_callback) (void)

Exit-callback trampoline.

◆ coredump_handler

SceKernelThreadEntry SceLibkernelAddresses::coredump_handler

User coredump-thread entry point.

◆ process_time

SceKernelSysClock* SceLibkernelAddresses::process_time

LibKernel process-time base initialized during registration.

◆ pmuserenr

SceUInt32* SceLibkernelAddresses::pmuserenr

LibKernel PMUSERENR cache updated by Processmgr.