7#ifndef _PSP2KERN_KERNEL_PROCESSMGR_H_
8#define _PSP2KERN_KERNEL_PROCESSMGR_H_
28 int unk[0xE8 / 4 - 6];
67#define SCE_KERNEL_PROCESS_TYPE_GAME (0x01000000U)
68#define SCE_KERNEL_PROCESS_TYPE_MINI_APPLICATION (0x02000000U)
69#define SCE_KERNEL_PROCESS_TYPE_SYSTEM_APPLICATION (0x04000000U)
71#define SCE_KERNEL_PROCESS_TYPE_KERNEL (0x05000000U)
74#define SCE_KERNEL_PROCESS_START_FLAG_DEBUG (0x80000000U)
77#define SCE_KERNEL_PROCESS_CURRENT_PROCESS_BUDGET (0)
79#define SCE_KERNEL_PROCESS_FULL_GAME_PROCESS_BUDGET (2)
81#define SCE_KERNEL_PROCESS_SYSTEM_APPLICATION_PROCESS_BUDGET (3)
#define VITASDK_BUILD_ASSERT_EQ(__size__, __name__)
Definition build_utils.h:13
SceUID pid
Definition debug.h:1
SceUInt64 time
Time of the event occurred.
Definition debug.h:7
SceSize size
Definition lsdb.h:11
SceInt32 type
Must be 100 when passed to sceLsdbReplaceTheme on FW 3.60.
Definition lsdb.h:2
SceUInt32 key
FNV-1a hash of the AppInfo key.
Definition lsdb.h:0
SceSize size
size of this struct, make sure it's 0xE8
Definition processmgr.h:22
SceSize size
Must be 0x40 on FW 3.60.
Definition processmgr.h:109
int ksceKernelGetProcessInfo(SceUID pid, SceKernelProcessInfo *info)
ScePID parent_pid
Parent process ID; the calling process's ID is used when this field is not selected.
Definition processmgr.h:116
SceSize unique_heap_size
Required and nonzero when selected by attr.
Definition processmgr.h:122
SceKernelProcessOptAttribute
Known option bits used in SceKernelProcessOpt2::attr on FW 3.60.
Definition processmgr.h:84
int ksceKernelStartProcessExt(ScePID pid, SceUInt32 start_flags, SceSize arg_size, const void *arg_block, SceUInt32 preload_flags)
Extended form of ksceKernelStartProcess.
SceUID budget_id
Budget selector or process-budget UID; the default selector is SCE_KERNEL_PROCESS_FULL_GAME_PROCESS_B...
Definition processmgr.h:115
void * ksceKernelGetProcessLocalStorageAddr(int key)
int unk3
Definition processmgr.h:26
SceUInt32 SceKernelProcessType
Definition processmgr.h:17
SceUInt32 reserved
Ignored on FW 3.60.
Definition processmgr.h:114
int ksceKernelLibcGettimeofday(SceKernelTimeval *tv, SceKernelTimezone *tz)
int ksceKernelCreateProcessLocalStorage(const char *name, SceSize size)
const void * klicensee
Pointer to a 16-byte klicensee when selected.
Definition processmgr.h:119
int ksceKernelResumeProcess(SceUID pid)
Resume a suspended process.
SceUID ppid
parent process ID
Definition processmgr.h:27
void * ksceKernelGetProcessKernelBuf(SceUID pid)
Previous VitaSDK name and prototype for ksceKernelUIDtoProcess.
SceSize stack_size
Main-thread stack size when selected; otherwise the process-image value or 0x40000 is used.
Definition processmgr.h:113
SceKernelProcessExitSpawnMode process_exit_spawn_mode
Exit-spawn handling mode when selected.
Definition processmgr.h:117
int ksceKernelKillProcess(ScePID pid, SceInt32 option)
Requests process termination.
SceKernelTime ksceKernelLibcTime(SceKernelTime *tloc)
SceUInt32 SceKernelTime
Definition processmgr.h:20
struct SceUIDProcessObject SceUIDProcessObject
Definition processmgr.h:19
SceInt32 init_priority
Initial main-thread priority when selected; otherwise the process-image value or 0x10000100 is used.
Definition processmgr.h:112
int unk[0xE8/4 - 6]
the rest is unknown
Definition processmgr.h:28
SceUID ksceKernelGetProcessMainThread(SceUID pid)
Get the main thread for a given process.
int ksceKernelStartProcess(ScePID pid, SceUInt32 start_flags, SceSize arg_size, const void *arg_block)
Starts a dormant process.
ScePID ksceKernelSpawnProcess(const char *name, SceKernelProcessType type, const char *path, SceSize arg_size, const void *arg_block, const SceKernelProcessOpt2 *opt)
Creates and starts a process.
SceUIDProcessObject * ksceKernelUIDtoProcess(ScePID pid)
Resolves a process ID to its internal process object without acquiring a reference.
SceUID pid
our process ID
Definition processmgr.h:23
ScePID process_exit_spawn_pid
Pending exit-spawn PID to reuse in enabled mode; zero allocates a new object.
Definition processmgr.h:118
SceUInt32 cpu_affinity_mask
Four-bit mask in bits 0-3 or bits 16-19; 0 selects the default. Do not combine the two encodings.
Definition processmgr.h:111
SceSize max_open_files
Maximum open-file count when selected; default is 64.
Definition processmgr.h:120
SceUInt32 ksceKernelGetProcessTimeLowCore(void)
Returns the wrapping low 32 bits of the current process's elapsed time in microseconds.
int ksceKernelGetProcessLocalStorageAddrForPid(SceUID pid, int key, void **out_addr, int create_if_doesnt_exist)
int ksceKernelGetRemoteProcessTime(ScePID pid, SceKernelSysClock *time)
Gets a process's running elapsed time or stored final time in microseconds.
int unk2
Definition processmgr.h:25
int ksceKernelGetProcessSelfAuthInfo(SceUID pid, SceSelfAuthInfo *self_auth_info)
Get the process self auth info.
int ksceKernelGetProcessTimeCore(SceKernelSysClock *time)
Gets the current process's elapsed time in microseconds.
int ksceKernelSuspendProcess(SceUID pid, int status)
Suspend a running process.
int ksceKernelGetProcessStatus(SceUID pid, int *status)
Get the status of a given process.
ScePID ksceKernelSpawnProcessExt(const char *name, SceKernelProcessType type, const char *path, SceSize arg_size, const void *arg_block, const SceKernelProcessOpt2 *opt, SceUInt32 preload_flags)
Extended form of ksceKernelSpawnProcess.
SceKernelProcessExitSpawnMode
Process-object handling mode selected during process creation.
Definition processmgr.h:102
ScePVoid ksceKernelGetProcessModuleInfo(SceUID pid)
Get the process module control block.
SceUInt32 power_configuration_flags
Selected value must fit in two bits; the default queried by ScePower is 3.
Definition processmgr.h:124
SceUInt32 display_resolution_flags
Selected value must use only bit 0 for 1280-wide modes and bit 1 for 1440/1920-wide modes.
Definition processmgr.h:123
SceClass * ksceKernelGetUIDProcessClass(void)
ScePID ksceKernelCreateProcess(const char *name, SceKernelProcessType type, const char *path, void *opt)
Create a dormant process.
SceBool ksceKernelIsCDialogAvailable(void)
Tests whether the current process budget reserves common-dialog memory.
SceUInt32 attr
Bitwise OR of SceKernelProcessOptAttribute values. FW 3.60 does not reject unlisted bits,...
Definition processmgr.h:110
int unk1
Definition processmgr.h:24
SceSize max_directory_open_level
Maximum directory-open nesting level when selected; default is 10.
Definition processmgr.h:121
int ksceKernelExitProcess(int status)
@ SCE_KERNEL_PROCESS_OPT_ATTR_POWER_CONFIGURATION_FLAGS
Use SceKernelProcessOpt2::power_configuration_flags.
Definition processmgr.h:94
@ SCE_KERNEL_PROCESS_OPT_ATTR_MAX_OPEN_FILES
Use SceKernelProcessOpt2::max_open_files.
Definition processmgr.h:90
@ SCE_KERNEL_PROCESS_OPT_ATTR_INITIAL_PRIORITY
Use SceKernelProcessOpt2::init_priority instead of the process-image value.
Definition processmgr.h:95
@ SCE_KERNEL_PROCESS_OPT_ATTR_BUDGET_ID
Use SceKernelProcessOpt2::budget_id.
Definition processmgr.h:86
@ SCE_KERNEL_PROCESS_OPT_ATTR_KLICENSEE
Copy the 16-byte klicensee.
Definition processmgr.h:89
@ SCE_KERNEL_PROCESS_OPT_ATTR_CPU_AFFINITY_MASK
Use SceKernelProcessOpt2::cpu_affinity_mask.
Definition processmgr.h:85
@ SCE_KERNEL_PROCESS_OPT_ATTR_REPORT_LOAD_PROGRESS
Request process-image load-progress reports.
Definition processmgr.h:97
@ SCE_KERNEL_PROCESS_OPT_ATTR_SUPPRESS_START_NOTIFICATIONS
Suppress the normal Sysroot process-start notifications.
Definition processmgr.h:98
@ SCE_KERNEL_PROCESS_OPT_ATTR_PROCESS_EXIT_SPAWN
Use the exit-spawn mode and PID.
Definition processmgr.h:88
@ SCE_KERNEL_PROCESS_OPT_ATTR_DISPLAY_RESOLUTION_FLAGS
Use SceKernelProcessOpt2::display_resolution_flags.
Definition processmgr.h:93
@ SCE_KERNEL_PROCESS_OPT_ATTR_STACK_SIZE
Use SceKernelProcessOpt2::stack_size instead of the process-image value.
Definition processmgr.h:96
@ SCE_KERNEL_PROCESS_OPT_ATTR_UNIQUE_HEAP_SIZE
Use SceKernelProcessOpt2::unique_heap_size.
Definition processmgr.h:92
@ SCE_KERNEL_PROCESS_OPT_ATTR_PARENT_PROCESS_ID
Use SceKernelProcessOpt2::parent_pid.
Definition processmgr.h:87
@ SCE_KERNEL_PROCESS_OPT_ATTR_MAX_DIRECTORY_OPEN_LEVEL
Use SceKernelProcessOpt2::max_directory_open_level.
Definition processmgr.h:91
@ SCE_KERNEL_PROCESS_EXIT_SPAWN_MODE_ENABLED
Enable exit-spawn handling and reuse a matching prepared object when requested.
Definition processmgr.h:104
@ SCE_KERNEL_PROCESS_EXIT_SPAWN_MODE_NORMAL
Allocate an ordinary new process object.
Definition processmgr.h:103
Definition processmgr.h:21
FW 3.60 process-creation options.
Definition processmgr.h:108
Definition processmgr.h:22
Definition processmgr.h:28
Definition uid_class.h:18
int ScePID
Process ID.
Definition types.h:91
int SceBool
Definition types.h:59
int32_t SceInt32
Definition types.h:44
unsigned int SceSize
Definition types.h:56
void * ScePVoid
Definition types.h:81
int SceUID
UIDs are used to describe many different kernel objects.
Definition types.h:90
uint32_t SceUInt32
Definition types.h:45
SceUInt64 SceKernelSysClock
64-bit system clock type.
Definition types.h:97
SELF authorization information returned by AuthMgr and stored by Processmgr.
Definition types.h:161