psl1ght
A free SDK for Sony's PS3 console
Data Structures | Macros | Typedefs | Functions
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. More...
 
#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 More...
 
LV2_SYSCALL sysProcessGetPpid (void)
 get parent process id More...
 
LV2_SYSCALL sysProcessGetNumberOfObject (u32 object, size_t *numptr)
 get number of object More...
 
LV2_SYSCALL sysProcessIsSpuLockLinkReservation (u32 addr, u64 flags)
 check if SPU can wait for lock line reservation lost event More...
 
LV2_SYSCALL sysProcessGetPpuGuid (void)
 get ppu guid info from ELF
 

Detailed Description

Process management.

Macro Definition Documentation

◆ 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)) = { \
SYS_PROCESS_SPAWN_MAGIC, \
SYS_PROCESS_SPAWN_VERSION_090, \
SYS_PROCESS_SPAWN_FW_VERSION_192, \
prio, \
stacksize, \
SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_1M, \
SYS_PROCESS_SPAWN_PPC_SEG_DEFAULT\
};
Definition: process.h:128

Configure process priority and stack size.

Typically call this macro outside function declarations.

Parameters
priopriority (1000 = normal)
stacksizestack size

◆ 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)) = { \
SYS_PROCESS_SPAWN_MAGIC, \
SYS_PROCESS_SPAWN_VERSION_090, \
SYS_PROCESS_SPAWN_FW_VERSION_192, \
prio, \
stacksize, \
SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_1M, \
SYS_PROCESS_SPAWN_PPC_SEG_PRX \
};
Definition: process.h:128

◆ 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)) = { \
SYS_PROCESS_SPAWN_MAGIC, \
SYS_PROCESS_SPAWN_VERSION_090, \
SYS_PROCESS_SPAWN_FW_VERSION_192, \
prio, \
stacksize, \
SYS_PROCESS_SPAWN_MALLOC_PAGE_SIZE_1M, \
SYS_PROCESS_SPAWN_PPC_SEG_OVLM \
};
Definition: process.h:128

Function Documentation

◆ sysProcessGetNumberOfObject()

LV2_SYSCALL sysProcessGetNumberOfObject ( u32  object,
size_t *  numptr 
)

get number of object

Parameters
object
numptr

◆ sysProcessGetPid()

LV2_SYSCALL sysProcessGetPid ( void  )

get process id

Parameters
object
buf
size
set_sizeget process id

◆ sysProcessGetPpid()

LV2_SYSCALL sysProcessGetPpid ( void  )

get parent process id

◆ sysProcessIsSpuLockLinkReservation()

LV2_SYSCALL sysProcessIsSpuLockLinkReservation ( u32  addr,
u64  flags 
)

check if SPU can wait for lock line reservation lost event

Parameters
addr
flags