psl1ght
A free SDK for Sony's PS3 console
Loading...
Searching...
No Matches
process.h File Reference

Process management. More...

#include <ppu-lv2.h>
#include <ppu-types.h>
#include <lv2/process.h>
#include <lv2/syscalls.h>

Go to the source code of this file.

Data Structures

struct  _sys_process_param
 

Macros

#define SYS_PROCESS_SPAWN_MAGIC   0x13bcc5f6
 
#define SYS_PROCESS_SPAWN_VERSION_1   0x00000001
 
#define SYS_PROCESS_SPAWN_VERSION_084   0x00008400
 
#define SYS_PROCESS_SPAWN_VERSION_090   0x00009000
 
#define SYS_PROCESS_SPAWN_VERSION_330   0x00330000
 
#define SYS_PROCESS_SPAWN_VERSION_INVALID   0xffffffff
 
#define SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_NONE   0x00000000
 
#define SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_64K   0x00010000
 
#define SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_1M   0x00100000
 
#define SYS_PROCESS_SPAWN_FW_VERSION_192   0x00192001
 
#define SYS_PROCESS_SPAWN_FW_VERSION_330   0x00330000
 
#define SYS_PROCESS_SPAWN_FW_VERSION_UNKNOWN   0xffffffff
 
#define SYS_PROCESS_SPAWN_PPC_SEG_DEFAULT   0x00000000
 
#define SYS_PROCESS_SPAWN_PPC_SEG_OVLM   0x00000001
 
#define SYS_PROCESS_SPAWN_PPC_SEG_PRX   0x00000002
 
#define SYS_PROCESS_SPAWN_STACK_SIZE_32K   0x10
 set stack size to 32 kilobytes.
 
#define SYS_PROCESS_SPAWN_STACK_SIZE_64K   0x20
 set stack size to 64 kilobytes.
 
#define SYS_PROCESS_SPAWN_STACK_SIZE_96K   0x30
 set stack size to 96 kilobytes.
 
#define SYS_PROCESS_SPAWN_STACK_SIZE_128K   0x40
 set stack size to 128 kilobytes.
 
#define SYS_PROCESS_SPAWN_STACK_SIZE_256K   0x50
 set stack size to 256 kilobytes.
 
#define SYS_PROCESS_SPAWN_STACK_SIZE_512K   0x60
 set stack size to 512 kilobytes.
 
#define SYS_PROCESS_SPAWN_STACK_SIZE_1M   0x70
 set stack size to 1 megabyte.
 
#define SYS_PROCESS_PARAM(prio, stacksize)
 Configure process priority and stack size.
 
#define SYS_PROCESS_PARAM_OVLM(prio, stacksize)
 
#define SYS_PROCESS_PARAM_FIXED(prio, stacksize)
 
#define SYS_OBJECT_MEM   (0x08UL)
 
#define SYS_OBJECT_MUTEX   (0x85UL)
 
#define SYS_OBJECT_COND   (0x86UL)
 
#define SYS_OBJECT_RWLOCK   (0x88UL)
 
#define SYS_OBJECT_INTR_TAG   (0x0AUL)
 
#define SYS_OBJECT_INTR_SERVICE_HANDLE   (0x0BUL)
 
#define SYS_OBJECT_EVENT_QUEUE   (0x8DUL)
 
#define SYS_OBJECT_EVENT_PORT   (0x0EUL)
 
#define SYS_OBJECT_TRACE   (0x21UL)
 
#define SYS_OBJECT_SPUIMAGE   (0x22UL)
 
#define SYS_OBJECT_PRX   (0x23UL)
 
#define SYS_OBJECT_SPUPORT   (0x24UL)
 
#define SYS_OBJECT_LWMUTEX   (0x95UL)
 
#define SYS_OBJECT_TIMER   (0x11UL)
 
#define SYS_OBJECT_SEMAPHORE   (0x96UL)
 
#define SYS_OBJECT_FS_FD   (0x73UL)
 
#define SYS_OBJECT_LWCOND   (0x97UL)
 
#define SYS_OBJECT_EVENT_FLAG   (0x98UL)
 

Typedefs

typedef struct _sys_process_param sys_process_param_t
 

Functions

LV2_SYSCALL sysProcessGetPid (void)
 get process id
 
LV2_SYSCALL sysProcessGetPpid (void)
 get parent process id
 
LV2_SYSCALL sysProcessGetNumberOfObject (u32 object, size_t *numptr)
 get number of object
 
LV2_SYSCALL sysProcessIsSpuLockLinkReservation (u32 addr, u64 flags)
 check if SPU can wait for lock line reservation lost event
 
LV2_SYSCALL sysProcessGetPpuGuid (void)
 get ppu guid info from ELF
 

Detailed Description

Process management.

Definition in file process.h.

Macro Definition Documentation

◆ SYS_OBJECT_COND

#define SYS_OBJECT_COND   (0x86UL)

Definition at line 105 of file process.h.

◆ SYS_OBJECT_EVENT_FLAG

#define SYS_OBJECT_EVENT_FLAG   (0x98UL)

Definition at line 120 of file process.h.

◆ SYS_OBJECT_EVENT_PORT

#define SYS_OBJECT_EVENT_PORT   (0x0EUL)

Definition at line 110 of file process.h.

◆ SYS_OBJECT_EVENT_QUEUE

#define SYS_OBJECT_EVENT_QUEUE   (0x8DUL)

Definition at line 109 of file process.h.

◆ SYS_OBJECT_FS_FD

#define SYS_OBJECT_FS_FD   (0x73UL)

Definition at line 118 of file process.h.

◆ SYS_OBJECT_INTR_SERVICE_HANDLE

#define SYS_OBJECT_INTR_SERVICE_HANDLE   (0x0BUL)

Definition at line 108 of file process.h.

◆ SYS_OBJECT_INTR_TAG

#define SYS_OBJECT_INTR_TAG   (0x0AUL)

Definition at line 107 of file process.h.

◆ SYS_OBJECT_LWCOND

#define SYS_OBJECT_LWCOND   (0x97UL)

Definition at line 119 of file process.h.

◆ SYS_OBJECT_LWMUTEX

#define SYS_OBJECT_LWMUTEX   (0x95UL)

Definition at line 115 of file process.h.

◆ SYS_OBJECT_MEM

#define SYS_OBJECT_MEM   (0x08UL)

Definition at line 103 of file process.h.

◆ SYS_OBJECT_MUTEX

#define SYS_OBJECT_MUTEX   (0x85UL)

Definition at line 104 of file process.h.

◆ SYS_OBJECT_PRX

#define SYS_OBJECT_PRX   (0x23UL)

Definition at line 113 of file process.h.

◆ SYS_OBJECT_RWLOCK

#define SYS_OBJECT_RWLOCK   (0x88UL)

Definition at line 106 of file process.h.

◆ SYS_OBJECT_SEMAPHORE

#define SYS_OBJECT_SEMAPHORE   (0x96UL)

Definition at line 117 of file process.h.

◆ SYS_OBJECT_SPUIMAGE

#define SYS_OBJECT_SPUIMAGE   (0x22UL)

Definition at line 112 of file process.h.

◆ SYS_OBJECT_SPUPORT

#define SYS_OBJECT_SPUPORT   (0x24UL)

Definition at line 114 of file process.h.

◆ SYS_OBJECT_TIMER

#define SYS_OBJECT_TIMER   (0x11UL)

Definition at line 116 of file process.h.

◆ SYS_OBJECT_TRACE

#define SYS_OBJECT_TRACE   (0x21UL)

Definition at line 111 of file process.h.

◆ SYS_PROCESS_PARAM

#define SYS_PROCESS_PARAM (   prio,
  stacksize 
)
Value:
sys_process_param_t __sys_process_param __attribute__((aligned(8), section(".sys_proc_param"), unused)) = { \
prio, \
stacksize, \
};
struct _heap_cntrl_t __attribute__
#define SYS_PROCESS_SPAWN_MAGIC
Definition process.h:14
#define SYS_PROCESS_SPAWN_PPC_SEG_DEFAULT
Definition process.h:30
#define SYS_PROCESS_SPAWN_VERSION_090
Definition process.h:18
#define SYS_PROCESS_SPAWN_FW_VERSION_192
Definition process.h:26
#define SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_1M
Definition process.h:24

Configure process priority and stack size.

Typically call this macro outside function declarations.

Parameters
priopriority (1000 = normal)
stacksizestack size

Definition at line 66 of file process.h.

◆ SYS_PROCESS_PARAM_FIXED

#define SYS_PROCESS_PARAM_FIXED (   prio,
  stacksize 
)
Value:
sys_process_param_t __sys_process_param __attribute__((aligned(8), section(".sys_proc_param"), unused)) = { \
prio, \
stacksize, \
};
#define SYS_PROCESS_SPAWN_PPC_SEG_PRX
Definition process.h:32

Definition at line 90 of file process.h.

◆ SYS_PROCESS_PARAM_OVLM

#define SYS_PROCESS_PARAM_OVLM (   prio,
  stacksize 
)
Value:
sys_process_param_t __sys_process_param __attribute__((aligned(8), section(".sys_proc_param"), unused)) = { \
prio, \
stacksize, \
};
#define SYS_PROCESS_SPAWN_PPC_SEG_OVLM
Definition process.h:31

Definition at line 78 of file process.h.

◆ SYS_PROCESS_SPAWN_FW_VERSION_192

#define SYS_PROCESS_SPAWN_FW_VERSION_192   0x00192001

Definition at line 26 of file process.h.

◆ SYS_PROCESS_SPAWN_FW_VERSION_330

#define SYS_PROCESS_SPAWN_FW_VERSION_330   0x00330000

Definition at line 27 of file process.h.

◆ SYS_PROCESS_SPAWN_FW_VERSION_UNKNOWN

#define SYS_PROCESS_SPAWN_FW_VERSION_UNKNOWN   0xffffffff

Definition at line 28 of file process.h.

◆ SYS_PROCESS_SPAWN_MAGIC

#define SYS_PROCESS_SPAWN_MAGIC   0x13bcc5f6

Definition at line 14 of file process.h.

◆ SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_1M

#define SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_1M   0x00100000

Definition at line 24 of file process.h.

◆ SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_64K

#define SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_64K   0x00010000

Definition at line 23 of file process.h.

◆ SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_NONE

#define SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_NONE   0x00000000

Definition at line 22 of file process.h.

◆ SYS_PROCESS_SPAWN_PPC_SEG_DEFAULT

#define SYS_PROCESS_SPAWN_PPC_SEG_DEFAULT   0x00000000

Definition at line 30 of file process.h.

◆ SYS_PROCESS_SPAWN_PPC_SEG_OVLM

#define SYS_PROCESS_SPAWN_PPC_SEG_OVLM   0x00000001

Definition at line 31 of file process.h.

◆ SYS_PROCESS_SPAWN_PPC_SEG_PRX

#define SYS_PROCESS_SPAWN_PPC_SEG_PRX   0x00000002

Definition at line 32 of file process.h.

◆ SYS_PROCESS_SPAWN_STACK_SIZE_128K

#define SYS_PROCESS_SPAWN_STACK_SIZE_128K   0x40

set stack size to 128 kilobytes.

Definition at line 41 of file process.h.

◆ SYS_PROCESS_SPAWN_STACK_SIZE_1M

#define SYS_PROCESS_SPAWN_STACK_SIZE_1M   0x70

set stack size to 1 megabyte.

Definition at line 47 of file process.h.

◆ SYS_PROCESS_SPAWN_STACK_SIZE_256K

#define SYS_PROCESS_SPAWN_STACK_SIZE_256K   0x50

set stack size to 256 kilobytes.

Definition at line 43 of file process.h.

◆ SYS_PROCESS_SPAWN_STACK_SIZE_32K

#define SYS_PROCESS_SPAWN_STACK_SIZE_32K   0x10

set stack size to 32 kilobytes.

Definition at line 35 of file process.h.

◆ SYS_PROCESS_SPAWN_STACK_SIZE_512K

#define SYS_PROCESS_SPAWN_STACK_SIZE_512K   0x60

set stack size to 512 kilobytes.

Definition at line 45 of file process.h.

◆ SYS_PROCESS_SPAWN_STACK_SIZE_64K

#define SYS_PROCESS_SPAWN_STACK_SIZE_64K   0x20

set stack size to 64 kilobytes.

Definition at line 37 of file process.h.

◆ SYS_PROCESS_SPAWN_STACK_SIZE_96K

#define SYS_PROCESS_SPAWN_STACK_SIZE_96K   0x30

set stack size to 96 kilobytes.

Definition at line 39 of file process.h.

◆ SYS_PROCESS_SPAWN_VERSION_084

#define SYS_PROCESS_SPAWN_VERSION_084   0x00008400

Definition at line 17 of file process.h.

◆ SYS_PROCESS_SPAWN_VERSION_090

#define SYS_PROCESS_SPAWN_VERSION_090   0x00009000

Definition at line 18 of file process.h.

◆ SYS_PROCESS_SPAWN_VERSION_1

#define SYS_PROCESS_SPAWN_VERSION_1   0x00000001

Definition at line 16 of file process.h.

◆ SYS_PROCESS_SPAWN_VERSION_330

#define SYS_PROCESS_SPAWN_VERSION_330   0x00330000

Definition at line 19 of file process.h.

◆ SYS_PROCESS_SPAWN_VERSION_INVALID

#define SYS_PROCESS_SPAWN_VERSION_INVALID   0xffffffff

Definition at line 20 of file process.h.

Typedef Documentation

◆ sys_process_param_t

Function Documentation

◆ sysProcessGetNumberOfObject()

LV2_SYSCALL sysProcessGetNumberOfObject ( u32  object,
size_t *  numptr 
)

get number of object

Parameters
object
numptr

Definition at line 176 of file process.h.

◆ sysProcessGetPid()

LV2_SYSCALL sysProcessGetPid ( void  )

get process id

Parameters
object
buf
size
set_size

get process id

Definition at line 157 of file process.h.

◆ sysProcessGetPpid()

LV2_SYSCALL sysProcessGetPpid ( void  )

get parent process id

Definition at line 166 of file process.h.

◆ sysProcessGetPpuGuid()

LV2_SYSCALL sysProcessGetPpuGuid ( void  )

get ppu guid info from ELF

Definition at line 194 of file process.h.

◆ sysProcessIsSpuLockLinkReservation()

LV2_SYSCALL sysProcessIsSpuLockLinkReservation ( u32  addr,
u64  flags 
)

check if SPU can wait for lock line reservation lost event

Parameters
addr
flags

Definition at line 186 of file process.h.