uOFW
Reverse engineered PSP kernel 6.60.
Functions
UsersystemLib Module

Functions

s32 sceKernelCpuSuspendIntr (void)
void sceKernelCpuResumeIntr (s32 intr)
void sceKernelCpuResumeIntrWithSync (s32 intr)
s32 sceKernelIsCpuIntrSuspended (s32 intr)
s32 sceKernelIsCpuIntrEnable (void)
s32 sub_00000208 (s32 dlId, void *stall)
s32 sceGe_lazy_31129B95 (s32 dlId, void *stall)
s32 sceKernelGetThreadId (void)
s32 sceKernelCheckThreadStack (void)
void * sceKernelGetTlsAddr (SceUID uid)
s32 sceKernelTryLockLwMutex (SceLwMutex *mutex, s32 count)
s32 sceKernelTryLockLwMutex_600 (SceLwMutex *mutex, s32 count)
s32 sceKernelLockLwMutexCB (SceLwMutex *mutex, s32 count)
s32 sceKernelLockLwMutex (SceLwMutex *mutex, s32 count)
s32 sceKernelUnlockLwMutex (SceLwMutex *mutex, s32 count)
s32 Kernel_Library_3AD10D4D (SceLwMutex *mutex)
s32 sceKernelReferLwMutexStatus (SceLwMutex *mutex, u32 *addr)
void * sceKernelMemcpy (void *dst, const void *src, SceSize size)
void * sceKernelMemset (void *dst, s8 val, SceSize size)

Detailed Description

Author:
geecko
Version:
6.60

The usersystemlib.prx module RE'ing.


Function Documentation

s32 sceKernelCpuSuspendIntr ( void  )

Suspends all interrupts.

Returns:
Current state of the interrupt controller.
void sceKernelCpuResumeIntr ( s32  intr)

Resumes all interrupts.

Parameters:
intrA state returned by sceKernelCpuSuspendIntr().
void sceKernelCpuResumeIntrWithSync ( s32  intr)

Resumes all interrupts, with synchronization.

Parameters:
intrA state returned by sceKernelCpuSuspendIntr().
s32 sceKernelIsCpuIntrSuspended ( s32  intr)

Checks if interrupts are suspended.

Parameters:
intrA state returned by sceKernelCpuSuspendIntr().
Returns:
1 if the state indicates that interrupts are suspended, otherwise 0.
s32 sceKernelIsCpuIntrEnable ( void  )

Checks if interrupts are enabled.

Returns:
1 if interrupts are enabled, otherwise 0.
s32 sub_00000208 ( s32  dlId,
void *  stall 
)

Calls sceGeListUpdateStallAddr.

This is NOT an exported function because it is only used by sceGe_lazy_31129B95(). Its syscall instruction is patched at runtime by the GE module.

s32 sceGe_lazy_31129B95 ( s32  dlId,
void *  stall 
)

Updates the stall address.

Calls sceGeListUpdateStallAddr with additional checks, limiting its call once out of 64 times. This function is only used by 'Genso Suikoden I & II'.

Parameters:
dlIdThe ID of the display list which stall address will be modified.
stallA new stall address.
Returns:
SCE_ERROR_OK on success, otherwise <0 on error.
s32 sceKernelGetThreadId ( void  )

Gets the current thread ID.

Returns:
The current thread ID, otherwise <0 on error.
s32 sceKernelCheckThreadStack ( void  )

Checks how much stack space is left for the current thread.

Returns:
The current thread's stack space available, otherwise <0 on error.
void* sceKernelGetTlsAddr ( SceUID  uid)

Gets a tls address.

Parameters:
uidUnique tls identifier.
Returns:
A pointer, otherwise NULL on error.
s32 sceKernelTryLockLwMutex ( SceLwMutex *  mutex,
s32  count 
)

Tries to lock a lightweight mutex.

This function is non-blocking. If the mutex is flagged as recursive, count can be >1. For more information, see http://linux.die.net/man/3/pthread_mutex_trylock

Parameters:
mutexPointer to a lightweight mutex structure.
countThe lock counter increment.
Returns:
SCE_ERROR_OK on success, otherwise SCE_ERROR_KERNEL_LWMUTEX_LOCKED on error.
s32 sceKernelTryLockLwMutex_600 ( SceLwMutex *  mutex,
s32  count 
)

Tries to lock a lightweight mutex (6.xx version).

This function is non-blocking. It could return SCE_ERROR_KERNEL_LWMUTEX_LOCKED. Unlike sceKernelTryLockLwMutex(), the error codes are more informative. If the mutex is flagged as recursive, count can be >1. For more information, see http://linux.die.net/man/3/pthread_mutex_trylock

Parameters:
mutexPointer to a lightweight mutex structure.
countThe lock counter increment.
Returns:
SCE_ERROR_OK on success, otherwise <0 on error.
s32 sceKernelLockLwMutexCB ( SceLwMutex *  mutex,
s32  count 
)

Locks a lightweight mutex (callback).

This function can be blocking if the mutex is already locked. If the mutex is flagged as recursive, count can be >1. For more information, see http://linux.die.net/man/3/pthread_mutex_lock

Parameters:
mutexPointer to a lightweight mutex structure.
countThe lock counter increment.
Returns:
SCE_ERROR_OK on success, otherwise <0 on error.
s32 sceKernelLockLwMutex ( SceLwMutex *  mutex,
s32  count 
)

Locks a lightweight mutex.

This function can be blocking if the mutex is already locked. If the mutex is flagged as recursive, count can be >1. For more information, see http://linux.die.net/man/3/pthread_mutex_lock

Parameters:
mutexPointer to a lightweight mutex structure.
countThe lock counter increment.
Returns:
SCE_ERROR_OK on success, otherwise <0 on error.
s32 sceKernelUnlockLwMutex ( SceLwMutex *  mutex,
s32  count 
)

Unlocks a lightweight mutex.

This function is non-blocking. If the mutex is flagged as recursive, count can be >1. For more information, see http://linux.die.net/man/3/pthread_mutex_unlock

Parameters:
mutexPointer to a lightweight mutex structure.
countThe lock counter decrement.
Returns:
SCE_ERROR_OK on success, otherwise <0 on error.
s32 Kernel_Library_3AD10D4D ( SceLwMutex *  mutex)

Gets the lock count of a lightweight mutex.

Parameters:
mutexPointer to a lightweight mutex structure.
Returns:
The mutex's lock count, otherwise <0 on error.
s32 sceKernelReferLwMutexStatus ( SceLwMutex *  mutex,
u32 *  addr 
)

Refers the lightweight mutex's status.

Parameters:
mutexPointer to a lightweight mutex structure.
addrUnknown.
Returns:
Unknown, may be SCE_ERROR_OK on success and <0 on error.
void* sceKernelMemcpy ( void *  dst,
const void *  src,
SceSize  size 
)

Copies a block of memory.

See http://www.cplusplus.com/reference/cstring/memcpy/

Parameters:
dstPointer to the memory block where the content will be copied.
srcPointer to the data source.
sizeNumber of bytes to copy.
Returns:
Value of dst.
void* sceKernelMemset ( void *  dst,
s8  val,
SceSize  size 
)

Fills a block of memory.

See http://www.cplusplus.com/reference/cstring/memset/

Parameters:
dstPointer to the memory block to fill.
valValue to be set.
sizeNumber of bytes to be set.
Returns:
Value of dst.
 All Data Structures Files Variables