6 int (*sceKernelAllocateDirectMemory
)(off_t searchStart
, off_t searchEnd
, size_t length
, size_t alignment
, int type
, off_t
*physicalAddressDestination
);
7 int (*sceKernelMapDirectMemory
)(void **addr
, size_t length
, int protection
, int flags
, off_t start
, size_t alignment
);
9 unsigned int (*sceKernelSleep
)(unsigned int seconds
);
10 int (*sceKernelUsleep
)(unsigned int microseconds
);
11 int (*sceKernelGettimeofday
)(SceKernelTimeval
*tp
);
12 uint64_t (*sceKernelGetProcessTime
)(void);
13 int (*sceKernelGetCurrentCpu
)(void);
15 int kill(int pid
, int signum
) {
16 return syscall(37, pid
, signum
);
19 void initKernel(void) {
21 loadModule("libkernel.sprx", &libkernel
);
23 RESOLVE(libkernel
, sceKernelAllocateDirectMemory
);
24 RESOLVE(libkernel
, sceKernelMapDirectMemory
);
26 RESOLVE(libkernel
, sceKernelSleep
);
27 RESOLVE(libkernel
, sceKernelUsleep
);
28 RESOLVE(libkernel
, sceKernelGettimeofday
);
29 RESOLVE(libkernel
, sceKernelGetProcessTime
);
30 RESOLVE(libkernel
, sceKernelGetCurrentCpu
);