remove link_prefixes

This commit is contained in:
2024-05-13 16:04:23 +02:00
parent 8a5e2870f6
commit 205e9a4c64
78 changed files with 1447 additions and 1568 deletions
+143 -146
View File
@@ -60,7 +60,6 @@ SceKernelSystemInfo :: struct {
}
#assert(size_of(SceKernelSystemInfo) == 0x48)
@(link_prefix = "sceKernel")
foreign libkernel {
/**
* Fills the output buffer with random data.
@@ -70,7 +69,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error.
*/
GetRandomNumber :: proc(output: rawptr, size: sce.Size) -> c.int ---
sceKernelGetRandomNumber :: proc(output: rawptr, size: sce.Size) -> c.int ---
/**
* Gets the status of a specified callback.
@@ -81,7 +80,7 @@ foreign libkernel {
*
* @return < 0 on error.
*/
GetCallbackInfo :: proc(cb: sce.UID, infop: ^SceKernelCallbackInfo) -> c.int ---
sceKernelGetCallbackInfo :: proc(cb: sce.UID, infop: ^SceKernelCallbackInfo) -> c.int ---
/**
* Creates a new condition variable
@@ -98,7 +97,7 @@ foreign libkernel {
* @param option - Condition variable options (normally set to 0)
* @return A condition variable id
*/
CreateCond :: proc(name: cstring, attr: sce.UInt, mutexId: sce.UID, option: ^SceKernelCondOptParam) -> sce.UID ---
sceKernelCreateCond :: proc(name: cstring, attr: sce.UInt, mutexId: sce.UID, option: ^SceKernelCondOptParam) -> sce.UID ---
/**
* Waits for a signal of a condition variable
@@ -107,7 +106,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error.
*/
WaitCond :: proc(condId: sce.UID, timeout: ^c.uint) -> c.int ---
sceKernelWaitCond :: proc(condId: sce.UID, timeout: ^c.uint) -> c.int ---
/**
* Waits for a signal of a condition variable (with callbacks)
@@ -116,7 +115,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error.
*/
WaitCondCB :: proc(condId: sce.UID, timeout: ^c.uint) -> c.int ---
sceKernelWaitCondCB :: proc(condId: sce.UID, timeout: ^c.uint) -> c.int ---
/**
* Create an event flag.
@@ -133,7 +132,7 @@ foreign libkernel {
* evid = sceKernelCreateEventFlag("wait_event", 0, 0, NULL)
* @endcode
*/
CreateEventFlag :: proc(name: cstring, attr: c.int, bits: c.int, opt: ^SceKernelEventFlagOptParam) -> sce.UID ---
sceKernelCreateEventFlag :: proc(name: cstring, attr: c.int, bits: c.int, opt: ^SceKernelEventFlagOptParam) -> sce.UID ---
/**
* Poll an event flag for a given bit pattern.
@@ -144,7 +143,7 @@ foreign libkernel {
* @param outBits - The bit pattern that was matched.
* @return < 0 On error
*/
PollEventFlag :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint) -> c.int ---
sceKernelPollEventFlag :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint) -> c.int ---
/**
* Wait for an event flag for a given bit pattern.
@@ -156,7 +155,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds
* @return < 0 On error
*/
WaitEventFlag :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint, timeout: ^sce.UInt) -> c.int ---
sceKernelWaitEventFlag :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint, timeout: ^sce.UInt) -> c.int ---
/**
* Wait for an event flag for a given bit pattern with callback.
@@ -168,7 +167,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds
* @return < 0 On error
*/
WaitEventFlagCB :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint, timeout: ^sce.UInt) -> c.int ---
sceKernelWaitEventFlagCB :: proc(evid: c.int, bits: c.uint, wait: c.uint, outBits: ^c.uint, timeout: ^sce.UInt) -> c.int ---
/**
* Get the status of an event flag.
@@ -178,20 +177,20 @@ foreign libkernel {
*
* @return < 0 on error.
*/
GetEventFlagInfo :: proc(event: sce.UID, info: ^SceKernelEventFlagInfo) -> c.int ---
sceKernelGetEventFlagInfo :: proc(event: sce.UID, info: ^SceKernelEventFlagInfo) -> c.int ---
CreateLwCond :: proc(pWork: ^SceKernelLwCondWork, pName: cstring, attr: c.uint, pLwMutex: ^SceKernelLwMutexWork, pOptParam: ^SceKernelLwCondOptParam) -> c.int ---
DeleteLwCond :: proc(pWork: ^SceKernelLwCondWork) -> c.int ---
SignalLwCond :: proc(pWork: ^SceKernelLwCondWork) -> c.int ---
SignalLwCondAll :: proc(pWork: ^SceKernelLwCondWork) -> c.int ---
SignalLwCondTo :: proc(pWork: ^SceKernelLwCondWork, threadId: sce.UID) -> c.int ---
WaitLwCond :: proc(pWork: ^SceKernelLwCondWork, pTimeout: ^c.uint) -> c.int ---
sceKernelCreateLwCond :: proc(pWork: ^SceKernelLwCondWork, pName: cstring, attr: c.uint, pLwMutex: ^SceKernelLwMutexWork, pOptParam: ^SceKernelLwCondOptParam) -> c.int ---
sceKernelDeleteLwCond :: proc(pWork: ^SceKernelLwCondWork) -> c.int ---
sceKernelSignalLwCond :: proc(pWork: ^SceKernelLwCondWork) -> c.int ---
sceKernelSignalLwCondAll :: proc(pWork: ^SceKernelLwCondWork) -> c.int ---
sceKernelSignalLwCondTo :: proc(pWork: ^SceKernelLwCondWork, threadId: sce.UID) -> c.int ---
sceKernelWaitLwCond :: proc(pWork: ^SceKernelLwCondWork, pTimeout: ^c.uint) -> c.int ---
CreateLwMutex :: proc(pWork: ^SceKernelLwMutexWork, pName: cstring, attr: c.uint, initCount: c.int, pOptParam: ^SceKernelLwMutexOptParam) -> c.int ---
DeleteLwMutex :: proc(pWork: ^SceKernelLwMutexWork) -> c.int ---
LockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, lockCount: c.int, pTimeout: ^c.uint) -> c.int ---
TryLockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, lockCount: c.int) -> c.int ---
UnlockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, unlockCount: c.int) -> c.int ---
sceKernelCreateLwMutex :: proc(pWork: ^SceKernelLwMutexWork, pName: cstring, attr: c.uint, initCount: c.int, pOptParam: ^SceKernelLwMutexOptParam) -> c.int ---
sceKernelDeleteLwMutex :: proc(pWork: ^SceKernelLwMutexWork) -> c.int ---
sceKernelLockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, lockCount: c.int, pTimeout: ^c.uint) -> c.int ---
sceKernelTryLockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, lockCount: c.int) -> c.int ---
sceKernelUnlockLwMutex :: proc(pWork: ^SceKernelLwMutexWork, unlockCount: c.int) -> c.int ---
/**
* Create a message pipe
@@ -204,7 +203,7 @@ foreign libkernel {
*
* @return The UID of the created pipe, < 0 on error
*/
CreateMsgPipe :: proc(name: cstring, type: c.int, attr: c.int, bufSize: c.uint, opt: rawptr) -> sce.UID ---
sceKernelCreateMsgPipe :: proc(name: cstring, type: c.int, attr: c.int, bufSize: c.uint, opt: rawptr) -> sce.UID ---
/**
* Send a message to a pipe
@@ -218,7 +217,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
SendMsgPipe :: proc(uid: sce.UID , message: rawptr, size: c.uint, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
sceKernelSendMsgPipe :: proc(uid: sce.UID , message: rawptr, size: c.uint, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
/**
* Send a message to a pipe (with callback)
@@ -232,7 +231,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
SendMsgPipeCB :: proc(uid: sce.UID, message: rawptr, size: c.uint, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
sceKernelSendMsgPipeCB :: proc(uid: sce.UID, message: rawptr, size: c.uint, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
/**
* Try to send a message to a pipe
@@ -245,7 +244,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
TrySendMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr) -> c.int ---
sceKernelTrySendMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr) -> c.int ---
/**
* Receive a message from a pipe
@@ -259,7 +258,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
ReceiveMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
sceKernelReceiveMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
/**
* Receive a message from a pipe (with callback)
@@ -273,7 +272,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
ReceiveMsgPipeCB :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
sceKernelReceiveMsgPipeCB :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr, timeout: ^c.uint) -> c.int ---
/**
* Receive a message from a pipe
@@ -286,7 +285,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
TryReceiveMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr) -> c.int ---
sceKernelTryReceiveMsgPipe :: proc(uid: sce.UID, message: rawptr, size: sce.Size, unk1: c.int, unk2: rawptr) -> c.int ---
/**
@@ -298,7 +297,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
CancelMsgPipe :: proc(uid: sce.UID, psend: ^c.int, precv: ^c.int) -> c.int ---
sceKernelCancelMsgPipe :: proc(uid: sce.UID, psend: ^c.int, precv: ^c.int) -> c.int ---
/**
* Get the status of a Message Pipe
@@ -308,7 +307,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
GetMsgPipeInfo :: proc(uid: sce.UID, info: ^SceKernelMppInfo) -> c.int ---
sceKernelGetMsgPipeInfo :: proc(uid: sce.UID, info: ^SceKernelMppInfo) -> c.int ---
/**
* Creates a new mutex
@@ -325,7 +324,7 @@ foreign libkernel {
* @param option - Mutex options (normally set to 0)
* @return A mutex id
*/
CreateMutex :: proc(name: cstring, attr: sce.UInt, initCount: c.int, option: ^SceKernelMutexOptParam) -> sce.UID ---
sceKernelCreateMutex :: proc(name: cstring, attr: sce.UInt, initCount: c.int, option: ^SceKernelMutexOptParam) -> sce.UID ---
/**
* Lock a mutex
@@ -335,7 +334,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error.
*/
LockMutex :: proc(mutexid: sce.UID, lockCount: c.int, timeout: ^c.uint) -> c.int ---
sceKernelLockMutex :: proc(mutexid: sce.UID, lockCount: c.int, timeout: ^c.uint) -> c.int ---
/**
* Lock a mutex and handle callbacks if necessary.
@@ -345,7 +344,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds (assumed)
* @return < 0 On error.
*/
LockMutexCB :: proc(mutexid: sce.UID, lockCount: c.int, timeout: ^c.uint) -> c.int ---
sceKernelLockMutexCB :: proc(mutexid: sce.UID, lockCount: c.int, timeout: ^c.uint) -> c.int ---
/**
* Cancels a mutex
@@ -355,7 +354,7 @@ foreign libkernel {
* @param numWaitThreads - Number of threads waiting for the mutex
* @return < 0 On error.
*/
CancelMutex :: proc(mutexid: sce.UID, newCount: c.int, numWaitThreads: ^c.int) -> c.int ---
sceKernelCancelMutex :: proc(mutexid: sce.UID, newCount: c.int, numWaitThreads: ^c.int) -> c.int ---
/**
* Retrieve information about a mutex.
@@ -365,7 +364,7 @@ foreign libkernel {
*
* @return < 0 on error.
*/
GetMutexInfo :: proc(mutexid: sce.UID, info: ^SceKernelMutexInfo) -> c.int ---
sceKernelGetMutexInfo :: proc(mutexid: sce.UID, info: ^SceKernelMutexInfo) -> c.int ---
/**
* Creates a new rwlock
@@ -381,7 +380,7 @@ foreign libkernel {
* @param option - RWLock options (normally set to NULL)
* @return RWLock id on success, < 0 on error
*/
CreateRWLock :: proc(name: cstring, attr: sce.UInt32, opt_param: ^SceKernelRWLockOptParam) -> sce.UID ---
sceKernelCreateRWLock :: proc(name: cstring, attr: sce.UInt32, opt_param: ^SceKernelRWLockOptParam) -> sce.UID ---
/**
* Lock a rwlock with read access
@@ -390,7 +389,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds, use NULL to disable it
* @return 0 on success, < 0 on error
*/
LockReadRWLock :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
sceKernelLockReadRWLock :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
/**
* Lock a rwlock with write access
@@ -399,7 +398,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds, use NULL to disable it
* @return 0 on success, < 0 on error
*/
LockWriteRWLock :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
sceKernelLockWriteRWLock :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
/**
* Lock a rwlock with read access and handle callbacks
@@ -408,7 +407,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds, use NULL to disable it
* @return 0 on success, < 0 on error
*/
LockReadRWLockCB :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
sceKernelLockReadRWLockCB :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
/**
* Lock a rwlock with write access and handle callbacks
@@ -417,7 +416,7 @@ foreign libkernel {
* @param timeout - Timeout in microseconds, use NULL to disable it
* @return 0 on success, < 0 on error
*/
LockWriteRWLockCB :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
sceKernelLockWriteRWLockCB :: proc(rwlock_id: sce.UID, timeout: ^c.uint) -> c.int ---
/**
* Retrieve information about a rwlock.
@@ -427,7 +426,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
GetRWLockInfo :: proc(rwlock_id: sce.UID, info: ^SceKernelRWLockInfo) -> c.int ---
sceKernelGetRWLockInfo :: proc(rwlock_id: sce.UID, info: ^SceKernelRWLockInfo) -> c.int ---
/**
* Creates a new semaphore
@@ -445,7 +444,7 @@ foreign libkernel {
* @param option - Sema options (normally set to 0)
* @return A semaphore id
*/
CreateSema :: proc(name: cstring, attr: sce.UInt, initVal: c.int, maxVal: c.int, option: ^SceKernelSemaOptParam) -> sce.UID ---
sceKernelCreateSema :: proc(name: cstring, attr: sce.UInt, initVal: c.int, maxVal: c.int, option: ^SceKernelSemaOptParam) -> sce.UID ---
/**
@@ -462,7 +461,7 @@ foreign libkernel {
*
* @return < 0 on error.
*/
WaitSema :: proc(semaid: sce.UID, signal: c.int, timeout: ^sce.UInt) -> c.int ---
sceKernelWaitSema :: proc(semaid: sce.UID, signal: c.int, timeout: ^sce.UInt) -> c.int ---
/**
* Lock a semaphore and handle callbacks if necessary.
@@ -478,7 +477,7 @@ foreign libkernel {
*
* @return < 0 on error.
*/
WaitSemaCB :: proc(semaid: sce.UID, signal: c.int, timeout: ^sce.UInt) -> c.int ---
sceKernelWaitSemaCB :: proc(semaid: sce.UID, signal: c.int, timeout: ^sce.UInt) -> c.int ---
/**
* Cancels a semaphore
@@ -488,7 +487,7 @@ foreign libkernel {
* @param numWaitThreads - Number of threads waiting for the semaphore
* @return < 0 On error.
*/
CancelSema :: proc(semaid: sce.UID, setCount: c.int, numWaitThreads: ^c.int) -> c.int ---
sceKernelCancelSema :: proc(semaid: sce.UID, setCount: c.int, numWaitThreads: ^c.int) -> c.int ---
/**
* Retrieve information about a semaphore.
@@ -498,7 +497,7 @@ foreign libkernel {
*
* @return < 0 on error.
*/
GetSemaInfo :: proc(semaid: sce.UID, info: ^SceKernelSemaInfo) -> c.int ---
sceKernelGetSemaInfo :: proc(semaid: sce.UID, info: ^SceKernelSemaInfo) -> c.int ---
/**
* @brief Sleep current thread and wait for a signal. After it receives a signal, the thread wakes up.
@@ -510,7 +509,7 @@ foreign libkernel {
* @param timeout the timeout if it's null, it waits indefinitely.
* @return 0 on success
*/
WaitSignal :: proc(unk0: sce.UInt32, delay: sce.UInt32, timeout: ^sce.UInt32) -> c.int ---
sceKernelWaitSignal :: proc(unk0: sce.UInt32, delay: sce.UInt32, timeout: ^sce.UInt32) -> c.int ---
/**
* Create a thread
@@ -541,7 +540,7 @@ foreign libkernel {
* @return UID of the created thread, or an error code.
*/
CreateThread :: proc(name: cstring, entry: SceKernelThreadEntry, initPriority: c.int, stackSize: sce.Size, attr: sce.UInt, cpuAffinityMask: c.int, option: ^SceKernelThreadOptParam) -> sce.UID ---
sceKernelCreateThread :: proc(name: cstring, entry: SceKernelThreadEntry, initPriority: c.int, stackSize: sce.Size, attr: sce.UInt, cpuAffinityMask: c.int, option: ^SceKernelThreadOptParam) -> sce.UID ---
/**
@@ -551,7 +550,7 @@ foreign libkernel {
* @param arglen - Length of the data pointed to by argp, in bytes
* @param argp - Pointer to the arguments.
*/
StartThread :: proc(thid: sce.UID, arglen: sce.Size, argp: rawptr) -> c.int ---
sceKernelStartThread :: proc(thid: sce.UID, arglen: sce.Size, argp: rawptr) -> c.int ---
/**
@@ -563,7 +562,7 @@ foreign libkernel {
*
* @return < 0 on error.
*/
WaitThreadEnd :: proc(thid: sce.UID, stat: ^c.int, timeout: ^sce.UInt) -> c.int ---
sceKernelWaitThreadEnd :: proc(thid: sce.UID, stat: ^c.int, timeout: ^sce.UInt) -> c.int ---
/**
* Wait until a thread has ended and handle callbacks if necessary.
@@ -574,7 +573,7 @@ foreign libkernel {
*
* @return < 0 on error.
*/
WaitThreadEndCB :: proc(thid: sce.UID, stat: ^c.int, timeout: ^sce.UInt) -> c.int ---
sceKernelWaitThreadEndCB :: proc(thid: sce.UID, stat: ^c.int, timeout: ^sce.UInt) -> c.int ---
/**
* Modify the attributes of the current thread.
@@ -584,7 +583,7 @@ foreign libkernel {
*
* @return < 0 on error.
*/
ChangeCurrentThreadAttr :: proc(clearAttr: sce.UInt, setAttr: sce.UInt) -> c.int ---
sceKernelChangeCurrentThreadAttr :: proc(clearAttr: sce.UInt, setAttr: sce.UInt) -> c.int ---
/**
@@ -592,7 +591,7 @@ foreign libkernel {
*
* @return The current thread priority
*/
GetThreadCurrentPriority :: proc() -> c.int ---
sceKernelGetThreadCurrentPriority :: proc() -> c.int ---
/**
* Get the exit status of a thread.
@@ -601,14 +600,14 @@ foreign libkernel {
* @param[out] status - Status out pointer
* @return The exit status
*/
GetThreadExitStatus :: proc(thid: sce.UID, status: ^c.int) -> c.int ---
sceKernelGetThreadExitStatus :: proc(thid: sce.UID, status: ^c.int) -> c.int ---
/**
* Check the thread stack?
*
* @return Unknown.
*/
CheckThreadStack :: proc() -> c.int ---
sceKernelCheckThreadStack :: proc() -> c.int ---
/**
@@ -628,7 +627,7 @@ foreign libkernel {
* @endcode
* @return 0 if successful, otherwise the error code.
*/
GetThreadInfo :: proc(thid: sce.UID, info: ^SceKernelThreadInfo) -> c.int ---
sceKernelGetThreadInfo :: proc(thid: sce.UID, info: ^SceKernelThreadInfo) -> c.int ---
/**
* Retrive the runtime status of a thread.
@@ -638,14 +637,14 @@ foreign libkernel {
*
* @return 0 if successful, otherwise the error code.
*/
GetThreadRunStatus :: proc(thid: sce.UID, status: ^SceKernelThreadRunStatus) -> c.int ---
sceKernelGetThreadRunStatus :: proc(thid: sce.UID, status: ^SceKernelThreadRunStatus) -> c.int ---
/**
* Get the current thread Id
*
* @return The thread id of the calling thread.
*/
GetThreadId :: proc() -> c.int ---
sceKernelGetThreadId :: proc() -> c.int ---
/**
* Get the system information
@@ -654,117 +653,117 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error
*/
GetSystemInfo :: proc(info: ^SceKernelSystemInfo) -> c.int ---
sceKernelGetSystemInfo :: proc(info: ^SceKernelSystemInfo) -> c.int ---
/**
* @brief sceKernelGetTLSAddr get pointer to TLS key area for current thread
* @param key - the TLS keyslot index
* @return pointer to TLS key value
*/
GetTLSAddr :: proc(key: c.int) -> rawptr ---
sceKernelGetTLSAddr :: proc(key: c.int) -> rawptr ---
AtomicSet8 :: proc(store: ^sce.Int8, value: sce.Int8) ---
AtomicSet16 :: proc(store: sce.Int16, value: sce.Int16) ---
AtomicSet32 :: proc(store: sce.Int32, value: sce.Int32) ---
AtomicSet64 :: proc(store: sce.Int64, value: sce.Int64) ---
sceKernelAtomicSet8 :: proc(store: ^sce.Int8, value: sce.Int8) ---
sceKernelAtomicSet16 :: proc(store: sce.Int16, value: sce.Int16) ---
sceKernelAtomicSet32 :: proc(store: sce.Int32, value: sce.Int32) ---
sceKernelAtomicSet64 :: proc(store: sce.Int64, value: sce.Int64) ---
AtomicCompareAndSet8 :: proc(store: sce.Int8, value, SceInt8, new_value: sce.Int8) -> sce.Int8 ---
AtomicCompareAndSet16 :: proc(store: sce.Int16, value, SceInt16, new_value: sce.Int16) -> sce.Int16 ---
AtomicCompareAndSet32 :: proc(store: sce.Int32, value, SceInt32, new_value: sce.Int32) -> sce.Int32 ---
AtomicCompareAndSet64 :: proc(store: sce.Int64, value, SceInt64, new_value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicCompareAndSet8 :: proc(store: sce.Int8, value, SceInt8, new_value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicCompareAndSet16 :: proc(store: sce.Int16, value, SceInt16, new_value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicCompareAndSet32 :: proc(store: sce.Int32, value, SceInt32, new_value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicCompareAndSet64 :: proc(store: sce.Int64, value, SceInt64, new_value: sce.Int64) -> sce.Int64 ---
AtomicAddAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicAddAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicAddAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicAddAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicAddAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicAddAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicAddAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicAddAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicAddUnless8 :: proc(store: sce.Int8, value: sce.Int8, cmpv: sce.Int8) -> sce.Bool ---
AtomicAddUnless16 :: proc(store: sce.Int16, value: sce.Int16, cmpv: sce.Int16) -> sce.Bool ---
AtomicAddUnless32 :: proc(store: sce.Int32, value: sce.Int32, cmpv: sce.Int32) -> sce.Bool ---
AtomicAddUnless64 :: proc(store: sce.Int64, value: sce.Int64, cmpv: sce.Int64) -> sce.Bool ---
sceKernelAtomicAddUnless8 :: proc(store: sce.Int8, value: sce.Int8, cmpv: sce.Int8) -> sce.Bool ---
sceKernelAtomicAddUnless16 :: proc(store: sce.Int16, value: sce.Int16, cmpv: sce.Int16) -> sce.Bool ---
sceKernelAtomicAddUnless32 :: proc(store: sce.Int32, value: sce.Int32, cmpv: sce.Int32) -> sce.Bool ---
sceKernelAtomicAddUnless64 :: proc(store: sce.Int64, value: sce.Int64, cmpv: sce.Int64) -> sce.Bool ---
AtomicSubAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicSubAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicSubAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicSubAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicSubAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicSubAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicSubAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicSubAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicAndAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicAndAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicAndAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicAndAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicAndAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicAndAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicAndAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicAndAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicOrAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicOrAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicOrAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicOrAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicOrAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicOrAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicOrAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicOrAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicXorAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicXorAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicXorAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicXorAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicXorAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicXorAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicXorAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicXorAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicClearAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicClearAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicClearAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicClearAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicClearAndGet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicClearAndGet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicClearAndGet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicClearAndGet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndSet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndSet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndSet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndSet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicGetAndSet8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicGetAndSet16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicGetAndSet32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicGetAndSet64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndAdd8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndAdd16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndAdd32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndAdd64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicGetAndAdd8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicGetAndAdd16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicGetAndAdd32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicGetAndAdd64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndSub8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndSub16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndSub32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndSub64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicGetAndSub8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicGetAndSub16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicGetAndSub32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicGetAndSub64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndAnd8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndAnd16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndAnd32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndAnd64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicGetAndAnd8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicGetAndAnd16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicGetAndAnd32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicGetAndAnd64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndOr8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndOr16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndOr32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndOr64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicGetAndOr8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicGetAndOr16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicGetAndOr32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicGetAndOr64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndXor8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndXor16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndXor32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndXor64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicGetAndXor8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicGetAndXor16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicGetAndXor32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicGetAndXor64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicGetAndClear8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
AtomicGetAndClear16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
AtomicGetAndClear32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
AtomicGetAndClear64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
sceKernelAtomicGetAndClear8 :: proc(store: sce.Int8, value: sce.Int8) -> sce.Int8 ---
sceKernelAtomicGetAndClear16 :: proc(store: sce.Int16, value: sce.Int16) -> sce.Int16 ---
sceKernelAtomicGetAndClear32 :: proc(store: sce.Int32, value: sce.Int32) -> sce.Int32 ---
sceKernelAtomicGetAndClear64 :: proc(store: sce.Int64, value: sce.Int64) -> sce.Int64 ---
AtomicClearMask8 :: proc(store: sce.Int8, value: sce.Int8) ---
AtomicClearMask16 :: proc(store: sce.Int16, value: sce.Int16) ---
AtomicClearMask32 :: proc(store: sce.Int32, value: sce.Int32) ---
AtomicClearMask64 :: proc(store: sce.Int64, value: sce.Int64) ---
sceKernelAtomicClearMask8 :: proc(store: sce.Int8, value: sce.Int8) ---
sceKernelAtomicClearMask16 :: proc(store: sce.Int16, value: sce.Int16) ---
sceKernelAtomicClearMask32 :: proc(store: sce.Int32, value: sce.Int32) ---
sceKernelAtomicClearMask64 :: proc(store: sce.Int64, value: sce.Int64) ---
AtomicDecIfPositive8 :: proc(store: ^sce.Int8) -> sce.Int8 ---
AtomicDecIfPositive16 :: proc(store: ^sce.Int16) -> sce.Int16 ---
AtomicDecIfPositive32 :: proc(store: ^sce.Int32) -> sce.Int32 ---
AtomicDecIfPositive64 :: proc(store: ^sce.Int64) -> sce.Int64 ---
sceKernelAtomicDecIfPositive8 :: proc(store: ^sce.Int8) -> sce.Int8 ---
sceKernelAtomicDecIfPositive16 :: proc(store: ^sce.Int16) -> sce.Int16 ---
sceKernelAtomicDecIfPositive32 :: proc(store: ^sce.Int32) -> sce.Int32 ---
sceKernelAtomicDecIfPositive64 :: proc(store: ^sce.Int64) -> sce.Int64 ---
LoadModule :: proc(path: cstring, flags: c.int, option: ^SceKernelLMOption) -> sce.UID ---
UnloadModule :: proc(modid: sce.UID, flags: c.int, option: ^SceKernelULMOption) -> c.int ---
sceKernelLoadModule :: proc(path: cstring, flags: c.int, option: ^SceKernelLMOption) -> sce.UID ---
sceKernelUnloadModule :: proc(modid: sce.UID, flags: c.int, option: ^SceKernelULMOption) -> c.int ---
StartModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: rawptr, status: ^c.int) -> c.int ---
StopModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: rawptr, status: ^c.int) -> c.int ---
sceKernelStartModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: rawptr, status: ^c.int) -> c.int ---
sceKernelStopModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: rawptr, status: ^c.int) -> c.int ---
LoadStartModule :: proc(path: cstring, args: sce.Size, argp: rawptr, flags: c.int, option: ^SceKernelLMOption, status: ^c.int) -> sce.UID ---
StopUnloadModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: ^SceKernelULMOption, status: ^c.int) -> c.int ---
sceKernelLoadStartModule :: proc(path: cstring, args: sce.Size, argp: rawptr, flags: c.int, option: ^SceKernelLMOption, status: ^c.int) -> sce.UID ---
sceKernelStopUnloadModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: c.int, option: ^SceKernelULMOption, status: ^c.int) -> c.int ---
/**
* Exit current Process with specified return code
@@ -773,7 +772,7 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error.
*/
ExitProcess :: proc(res: c.int) -> c.int ---
sceKernelExitProcess :: proc(res: c.int) -> c.int ---
/**
* Get the process time of the current process.
@@ -782,23 +781,21 @@ foreign libkernel {
*
* @return 0 on success, < 0 on error.
*/
GetProcessTime :: proc(pSysClock: ^sce.KernelSysClock) -> c.int ---
sceKernelGetProcessTime :: proc(pSysClock: ^sce.KernelSysClock) -> c.int ---
/**
* Get the lower 32 bits part of process time of the current process.
*
* @return process time of the current process
*/
GetProcessTimeLow :: proc() -> sce.UInt32 ---
sceKernelGetProcessTimeLow :: proc() -> sce.UInt32 ---
/**
* Get the process time of the current process.
*
* @return process time of the current process
*/
GetProcessTimeWide :: proc() -> sce.UInt64 ---
sceKernelGetProcessTimeWide :: proc() -> sce.UInt64 ---
GetOpenPsId :: proc(id: ^SceKernelOpenPsId) -> c.int ---
sceKernelGetOpenPsId :: proc(id: ^SceKernelOpenPsId) -> c.int ---
}
+14 -22
View File
@@ -10,10 +10,9 @@ SceKernelLoadModuleOption :: struct {}
SceKernelUnloadModuleOption :: struct {}
SceKernelLibraryInfo :: struct {}
@(link_prefix = "sceKernel")
foreign modulemgr {
GetModuleInfo :: proc(uid: sce.UID, info: ^SceKernelModuleInfo) -> c.int ---
GetModuleList :: proc(type: sce.UInt8, uids: [^]sce.UID, num: ^sce.Size) -> c.int ---
sceKernelGetModuleInfo :: proc(uid: sce.UID, info: ^SceKernelModuleInfo) -> c.int ---
sceKernelGetModuleList :: proc(type: sce.UInt8, uids: [^]sce.UID, num: ^sce.Size) -> c.int ---
/**
* Gets system firmware information.
@@ -22,27 +21,20 @@ foreign modulemgr {
*
* @note - If you spoofed the firmware version it will return the spoofed firmware.
*/
GetSystemSwVersion :: proc(version: ^SceKernelSystemSwVersion) -> c.int ---
sceKernelGetSystemSwVersion :: proc(version: ^SceKernelSystemSwVersion) -> c.int ---
@(link_name = "_sceKernelLoadModule")
_LoadModule :: proc(module_filename: cstring, flags: sce.UInt32, option: ^SceKernelLoadModuleOption) -> sce.UID ---
@(link_name = "_sceKernelLoadStartModule")
_LoadStartModule :: proc(module_filename: cstring, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
@(link_name = "_sceKernelUnloadModule")
_UnloadModule :: proc(uid: sce.UID, flags: sce.UInt32, option: ^SceKernelUnloadModuleOption) -> c.int ---
@(link_name = "_sceKernelStopModule")
_StopModule :: proc(uid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> c.int ---
@(link_name = "_sceKernelStopUnloadModule")
_StopUnloadModule :: proc(uid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> c.int ---
_sceKernelLoadModule :: proc(module_filename: cstring, flags: sce.UInt32, option: ^SceKernelLoadModuleOption) -> sce.UID ---
_sceKernelLoadStartModule :: proc(module_filename: cstring, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
_sceKernelUnloadModule :: proc(uid: sce.UID, flags: sce.UInt32, option: ^SceKernelUnloadModuleOption) -> c.int ---
_sceKernelStopModule :: proc(uid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> c.int ---
_sceKernelStopUnloadModule :: proc(uid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> c.int ---
@(link_name = "_sceKernelOpenModule")
_OpenModule :: proc(module_filename: cstring, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
@(link_name = "_sceKernelCloseModule")
_CloseModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
_sceKernelOpenModule :: proc(module_filename: cstring, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
_sceKernelCloseModule :: proc(modid: sce.UID, args: sce.Size, argp: rawptr, flags: sce.UInt32) -> sce.UID ---
GetLibraryInfoByNID :: proc(modid: sce.UID, libnid: sce.NID, info: ^SceKernelLibraryInfo) -> c.int ---
sceKernelGetLibraryInfoByNID :: proc(modid: sce.UID, libnid: sce.NID, info: ^SceKernelLibraryInfo) -> c.int ---
IsCalledFromSysModule :: proc(lr: rawptr) -> c.int ---
GetModuleIdByAddr :: proc(addr: rawptr) -> sce.UID ---
GetAllowedSdkVersionOnSystem :: proc() -> sce.UInt32 ---
sceKernelIsCalledFromSysModule :: proc(lr: rawptr) -> c.int ---
sceKernelGetModuleIdByAddr :: proc(addr: rawptr) -> sce.UID ---
sceKernelGetAllowedSdkVersionOnSystem :: proc() -> sce.UInt32 ---
}
+12 -13
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import processmgr "system:SceProcessmgr_stub"
@(link_prefix = "sceKernel")
foreign processmgr {
/**
* Cancel specified idle timers to prevent entering in power save processing.
@@ -14,7 +13,7 @@ foreign processmgr {
*
* @return 0
*/
PowerTick :: proc(type: SceKernelPowerTickType) -> c.int ---
sceKernelPowerTick :: proc(type: SceKernelPowerTickType) -> c.int ---
/**
* Locks certain timers from triggering.
@@ -23,7 +22,7 @@ foreign processmgr {
*
* @return 0
*/
PowerLock :: proc(type: SceKernelPowerTickType) -> c.int ---
sceKernelPowerLock :: proc(type: SceKernelPowerTickType) -> c.int ---
/**
* Unlocks certain timers.
@@ -32,19 +31,19 @@ foreign processmgr {
*
* @return 0
*/
PowerUnlock :: proc(type: SceKernelPowerTickType) -> c.int ---
sceKernelPowerUnlock :: proc(type: SceKernelPowerTickType) -> c.int ---
GetCurrentProcess :: proc() -> sce.UID ---
GetRemoteProcessTime :: proc(processId: sce.UID, pClock: ^sce.KernelSysClock) -> sce.Int32 ---
sceKernelGetCurrentProcess :: proc() -> sce.UID ---
sceKernelGetRemoteProcessTime :: proc(processId: sce.UID, pClock: ^sce.KernelSysClock) -> sce.Int32 ---
GetStderr :: proc() -> sce.UID ---
GetStdin :: proc() -> sce.UID ---
GetStdout :: proc() -> sce.UID ---
sceKernelGetStderr :: proc() -> sce.UID ---
sceKernelGetStdin :: proc() -> sce.UID ---
sceKernelGetStdout :: proc() -> sce.UID ---
GetProcessParam :: proc() -> rawptr ---
sceKernelGetProcessParam :: proc() -> rawptr ---
LibcClock :: proc() -> SceKernelClock ---
LibcTime :: proc(tloc: ^SceKernelTime) -> SceKernelTime ---
sceKernelLibcClock :: proc() -> SceKernelClock ---
sceKernelLibcTime :: proc(tloc: ^SceKernelTime) -> SceKernelTime ---
LibcGettimeofday :: proc(tv: ^SceKernelTimeval, tz: ^SceKernelTimezone) -> c.int ---
sceKernelLibcGettimeofday :: proc(tv: ^SceKernelTimeval, tz: ^SceKernelTimezone) -> c.int ---
}
+17 -18
View File
@@ -5,9 +5,8 @@ import sce "../common"
foreign import sysmem "system:SceSysmem_stub"
@(link_prefix = "sceKernel")
foreign sysmem {
GetCpuId :: proc() -> c.int ---
sceKernelGetCpuId :: proc() -> c.int ---
/**
* Allocates a new memory block
@@ -19,7 +18,7 @@ foreign sysmem {
*
* @return SceUID of the memory block on success, < 0 on error.
*/
AllocMemBlock :: proc(name: cstring, type: SceKernelMemBlockType, size: sce.Size, opt: ^SceKernelAllocMemBlockOpt) -> sce.UID ---
sceKernelAllocMemBlock :: proc(name: cstring, type: SceKernelMemBlockType, size: sce.Size, opt: ^SceKernelAllocMemBlockOpt) -> sce.UID ---
/**
* Frees new memory block
@@ -28,7 +27,7 @@ foreign sysmem {
*
* @return 0 on success, < 0 on error.
*/
FreeMemBlock :: proc(uid: sce.UID) -> c.int ---
sceKernelFreeMemBlock :: proc(uid: sce.UID) -> c.int ---
/**
* Gets the base address of a memory block
@@ -38,34 +37,34 @@ foreign sysmem {
*
* @return 0 on success, < 0 on error.
*/
GetMemBlockBase :: proc(uid: sce.UID, base: ^rawptr) -> c.int ---
sceKernelGetMemBlockBase :: proc(uid: sce.UID, base: ^rawptr) -> c.int ---
FindMemBlockByAddr :: proc(addr: rawptr, size: sce.Size) -> sce.UID ---
sceKernelFindMemBlockByAddr :: proc(addr: rawptr, size: sce.Size) -> sce.UID ---
GetMemBlockInfoByAddr :: proc(base: rawptr, info: ^SceKernelMemBlockInfo) -> c.int ---
GetMemBlockInfoByRange :: proc(base: rawptr, size: sce.Size, info: ^SceKernelMemBlockInfo) -> c.int ---
sceKernelGetMemBlockInfoByAddr :: proc(base: rawptr, info: ^SceKernelMemBlockInfo) -> c.int ---
sceKernelGetMemBlockInfoByRange :: proc(base: rawptr, size: sce.Size, info: ^SceKernelMemBlockInfo) -> c.int ---
AllocMemBlockForVM :: proc(name: cstring, size: sce.Size) -> sce.UID ---
SyncVMDomain :: proc(uid: sce.UID, data: rawptr, size: sce.Size) -> c.int ---
OpenVMDomain :: proc() -> c.int ---
CloseVMDomain :: proc() -> c.int ---
sceKernelAllocMemBlockForVM :: proc(name: cstring, size: sce.Size) -> sce.UID ---
sceKernelSyncVMDomain :: proc(uid: sce.UID, data: rawptr, size: sce.Size) -> c.int ---
sceKernelOpenVMDomain :: proc() -> c.int ---
sceKernelCloseVMDomain :: proc() -> c.int ---
OpenMemBlock :: proc(name: cstring, flags: c.int) -> c.int ---
CloseMemBlock :: proc(uid: sce.UID) -> c.int ---
sceKernelOpenMemBlock :: proc(name: cstring, flags: c.int) -> c.int ---
sceKernelCloseMemBlock :: proc(uid: sce.UID) -> c.int ---
/**
* Get the model number of the device
*
* @return A value from SCE_KERNEL_MODEL
*/
GetModelForCDialog :: proc() -> c.int ---
sceKernelGetModelForCDialog :: proc() -> c.int ---
/**
* Get the model number of the device
*
* @return A value from SCE_KERNEL_MODEL
*/
GetModel :: proc() -> c.int ---
sceKernelGetModel :: proc() -> c.int ---
/**
* Get free memory size in bytes
@@ -73,7 +72,7 @@ foreign sysmem {
* @param[out] info - Returned free memory size for different kind of memory block types
* @return 0 on success, < 0 on error.
*/
GetFreeMemorySize :: proc(info: ^SceKernelFreeMemorySizeInfo) -> c.int ---
sceKernelGetFreeMemorySize :: proc(info: ^SceKernelFreeMemorySizeInfo) -> c.int ---
IsPSVitaTV :: proc() -> c.int ---
sceKernelIsPSVitaTV :: proc() -> c.int ---
}
+47 -49
View File
@@ -5,7 +5,6 @@ import sce "../common"
foreign import threadmgr "system:SceKernelThreadMgr_stub"
@(link_prefix = "sceKernel")
foreign threadmgr {
/**
* Create callback
@@ -23,7 +22,7 @@ foreign threadmgr {
*
* @return >= 0 A callback id which can be used in subsequent functions, < 0 an error.
*/
CreateCallback :: proc(name: cstring, attr: c.uint, func: SceKernelCallbackFunction, userData: rawptr) -> c.int ---
sceKernelCreateCallback :: proc(name: cstring, attr: c.uint, func: SceKernelCallbackFunction, userData: rawptr) -> c.int ---
/**
* Delete a callback
@@ -32,7 +31,7 @@ foreign threadmgr {
*
* @return 0 on success, < 0 on error
*/
DeleteCallback :: proc(cb: sce.UID) -> c.int ---
sceKernelDeleteCallback :: proc(cb: sce.UID) -> c.int ---
/**
* Notify a callback
@@ -42,7 +41,7 @@ foreign threadmgr {
*
* @return 0 on success, < 0 on error
*/
NotifyCallback :: proc(cb: sce.UID, arg2: c.int) -> c.int ---
sceKernelNotifyCallback :: proc(cb: sce.UID, arg2: c.int) -> c.int ---
/**
* Cancel a callback ?
@@ -51,7 +50,7 @@ foreign threadmgr {
*
* @return 0 on success, < 0 on error
*/
CancelCallback :: proc(cb: sce.UID) -> c.int ---
sceKernelCancelCallback :: proc(cb: sce.UID) -> c.int ---
/**
* Get the callback count
@@ -60,14 +59,14 @@ foreign threadmgr {
*
* @return The callback count, < 0 on error
*/
GetCallbackCount :: proc(cb: sce.UID) -> c.int ---
sceKernelGetCallbackCount :: proc(cb: sce.UID) -> c.int ---
/**
* Check callback ?
*
* @return Something or another
*/
CheckCallback :: proc() -> c.int ---
sceKernelCheckCallback :: proc() -> c.int ---
/**
* Destroy a condition variable
@@ -75,7 +74,7 @@ foreign threadmgr {
* @param condition variableid - The condition variable id returned from ::sceKernelCreateCond
* @return Returns the value 0 if it's successful, otherwise -1
*/
DeleteCond :: proc(condId: sce.UID) -> c.int ---
sceKernelDeleteCond :: proc(condId: sce.UID) -> c.int ---
/**
* Open a condition variable
@@ -83,7 +82,7 @@ foreign threadmgr {
* @param name - The name of the condition variable to open
* @return Returns the value 0 if it's successful, otherwise -1
*/
OpenCond :: proc(name: cstring) -> c.int ---
sceKernelOpenCond :: proc(name: cstring) -> c.int ---
/**
* Close a condition variable
@@ -91,7 +90,7 @@ foreign threadmgr {
* @param condition variableid - The condition variable id returned from ::sceKernelCreateCond
* @return Returns the value 0 if it's successful, otherwise -1
*/
CloseCond :: proc(condId: sce.UID) -> c.int ---
sceKernelCloseCond :: proc(condId: sce.UID) -> c.int ---
/**
* Signals a condition variable
@@ -99,7 +98,7 @@ foreign threadmgr {
* @param condId - The condition variable id returned from ::sceKernelCreateCond
* @return < 0 On error.
*/
SignalCond :: proc(condId: sce.UID) -> c.int ---
sceKernelSignalCond :: proc(condId: sce.UID) -> c.int ---
/**
* Signals a condition variable to all threads waiting for it
@@ -107,7 +106,7 @@ foreign threadmgr {
* @param condId - The condition variable id returned from ::sceKernelCreateCond
* @return < 0 On error.
*/
SignalCondAll :: proc(condId: sce.UID) -> c.int ---
sceKernelSignalCondAll :: proc(condId: sce.UID) -> c.int ---
/**
* Signals a condition variable to a specific thread waiting for it
@@ -116,7 +115,7 @@ foreign threadmgr {
* @param threadId - The thread id returned from ::sceKernelCreateThread
* @return < 0 On error.
*/
SignalCondTo :: proc(condId: sce.UID, threadId: sce.UID) -> c.int ---
sceKernelSignalCondTo :: proc(condId: sce.UID, threadId: sce.UID) -> c.int ---
/**
* Set an event flag bit pattern.
@@ -126,7 +125,7 @@ foreign threadmgr {
*
* @return < 0 On error
*/
SetEventFlag :: proc(evid: sce.UID, bits: c.uint) -> c.int ---
sceKernelSetEventFlag :: proc(evid: sce.UID, bits: c.uint) -> c.int ---
/**
* Clear a event flag bit pattern
@@ -136,7 +135,7 @@ foreign threadmgr {
*
* @return < 0 on Error
*/
ClearEventFlag :: proc(evid: sce.UID, bits: c.uint) -> c.int ---
sceKernelClearEventFlag :: proc(evid: sce.UID, bits: c.uint) -> c.int ---
/**
* Delete an event flag
@@ -145,7 +144,7 @@ foreign threadmgr {
*
* @return < 0 On error
*/
DeleteEventFlag :: proc(evid: c.int) -> c.int ---
sceKernelDeleteEventFlag :: proc(evid: c.int) -> c.int ---
/**
* Delete a message pipe
@@ -154,7 +153,7 @@ foreign threadmgr {
*
* @return 0 on success, < 0 on error
*/
DeleteMsgPipe :: proc(uid: sce.UID) -> c.int ---
sceKernelDeleteMsgPipe :: proc(uid: sce.UID) -> c.int ---
/**
* Destroy a mutex
@@ -162,7 +161,7 @@ foreign threadmgr {
* @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @return Returns the value 0 if it's successful, otherwise -1
*/
DeleteMutex :: proc(mutexid: sce.UID) -> c.int ---
sceKernelDeleteMutex :: proc(mutexid: sce.UID) -> c.int ---
/**
@@ -171,7 +170,7 @@ foreign threadmgr {
* @param name - The name of the mutex to open
* @return Returns the value 0 if it's successful, otherwise -1
*/
OpenMutex :: proc(name: cstring) -> c.int ---
sceKernelOpenMutex :: proc(name: cstring) -> c.int ---
/**
* Close a mutex
@@ -179,7 +178,7 @@ foreign threadmgr {
* @param mutexid - The mutex id returned from ::sceKernelCreateMutex
* @return Returns the value 0 if it's successful, otherwise -1
*/
CloseMutex :: proc(mutexid: sce.UID) -> c.int ---
sceKernelCloseMutex :: proc(mutexid: sce.UID) -> c.int ---
/**
@@ -189,7 +188,7 @@ foreign threadmgr {
* @param lockCount - The value to increment to the lock count of the mutex
* @return < 0 On error.
*/
TryLockMutex :: proc(mutexid: sce.UID, lockCount: c.int) -> c.int ---
sceKernelTryLockMutex :: proc(mutexid: sce.UID, lockCount: c.int) -> c.int ---
/**
* Try to unlock a mutex (non-blocking)
@@ -198,7 +197,7 @@ foreign threadmgr {
* @param unlockCount - The value to decrement to the lock count of the mutex
* @return < 0 On error.
*/
UnlockMutex :: proc(mutexid: sce.UID, unlockCount: c.int) -> c.int ---
sceKernelUnlockMutex :: proc(mutexid: sce.UID, unlockCount: c.int) -> c.int ---
/**
* Destroy a rwlock
@@ -206,7 +205,7 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error
*/
DeleteRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
sceKernelDeleteRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/**
* Open a rwlock
@@ -214,7 +213,7 @@ foreign threadmgr {
* @param name - The name of the rwlock to open
* @return RWLock id on success, < 0 on error
*/
OpenRWLock :: proc(name: cstring) -> sce.UID ---
sceKernelOpenRWLock :: proc(name: cstring) -> sce.UID ---
/**
* Close a rwlock
@@ -222,14 +221,14 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error
*/
CloseRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
sceKernelCloseRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/**
* Try to lock a rwlock with read access (non-blocking)
*
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error
*/
TryLockReadRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
sceKernelTryLockReadRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/**
* Try to lock a rwlock with write access (non-blocking)
@@ -237,7 +236,7 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error
*/
TryLockWriteRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
sceKernelTryLockWriteRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/**
* Try to unlock a rwlock with read access (non-blocking)
@@ -245,7 +244,7 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error
*/
UnlockReadRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
sceKernelUnlockReadRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/**
* Try to unlock a rwlock with write access (non-blocking)
@@ -253,7 +252,7 @@ foreign threadmgr {
* @param rwlock_id - The rwlock id returned from ::sceKernelCreateRWLock
* @return 0 on success, < 0 on error
*/
UnlockWriteRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
sceKernelUnlockWriteRWLock :: proc(rwlock_id: sce.UID) -> c.int ---
/**
* Destroy a semaphore
@@ -261,7 +260,7 @@ foreign threadmgr {
* @param semaid - The semaid returned from a previous create call.
* @return Returns the value 0 if it's successful, otherwise -1
*/
DeleteSema :: proc(semaid: sce.UID) -> c.int ---
sceKernelDeleteSema :: proc(semaid: sce.UID) -> c.int ---
/**
* Send a signal to a semaphore
@@ -277,7 +276,7 @@ foreign threadmgr {
*
* @return < 0 On error.
*/
SignalSema :: proc(semaid: sce.UID, signal: c.int) -> c.int ---
sceKernelSignalSema :: proc(semaid: sce.UID, signal: c.int) -> c.int ---
/**
* Poll a semaphore.
@@ -287,11 +286,11 @@ foreign threadmgr {
*
* @return < 0 on error.
*/
PollSema :: proc(semaid: sce.UID, signal: c.int) -> c.int ---
sceKernelPollSema :: proc(semaid: sce.UID, signal: c.int) -> c.int ---
OpenSema :: proc(name: cstring) -> sce.UID ---
sceKernelOpenSema :: proc(name: cstring) -> sce.UID ---
CloseSema :: proc(semaid: sce.UID) -> c.int ---
sceKernelCloseSema :: proc(semaid: sce.UID) -> c.int ---
/**
* @brief Send a signal to the thread specified by thid. Note that it can send a signal to the current thread as well.
@@ -300,7 +299,7 @@ foreign threadmgr {
* @return 0 on success
* @return SCE_KERNEL_ERROR_ALREADY_SENT if the last signal was not consumed by sceKernelWaitSignal
*/
SendSignal :: proc(thid: sce.UID) -> c.int ---
sceKernelSendSignal :: proc(thid: sce.UID) -> c.int ---
/**
* Delate a thread
@@ -309,7 +308,7 @@ foreign threadmgr {
*
* @return < 0 on error.
*/
DeleteThread :: proc(thid: sce.UID) -> c.int ---
sceKernelDeleteThread :: proc(thid: sce.UID) -> c.int ---
/**
@@ -317,7 +316,7 @@ foreign threadmgr {
*
* @param status - Exit status.
*/
ExitThread :: proc(status: c.int) -> c.int ---
sceKernelExitThread :: proc(status: c.int) -> c.int ---
/**
@@ -325,7 +324,7 @@ foreign threadmgr {
*
* @param status - Exit status
*/
ExitDeleteThread :: proc(status: c.int) -> c.int ---
sceKernelExitDeleteThread :: proc(status: c.int) -> c.int ---
/**
* Delay the current thread by a specified number of microseconds
@@ -337,7 +336,7 @@ foreign threadmgr {
* sceKernelDelayThread(1000000) // Delay for a second
* @endcode
*/
DelayThread :: proc(delay: sce.UInt) -> c.int ---
sceKernelDelayThread :: proc(delay: sce.UInt) -> c.int ---
/**
* Delay the current thread by a specified number of microseconds and handle any callbacks.
@@ -349,7 +348,7 @@ foreign threadmgr {
* sceKernelDelayThread(1000000) // Delay for a second
* @endcode
*/
DelayThreadCB :: proc(delay: sce.UInt) -> c.int ---
sceKernelDelayThreadCB :: proc(delay: sce.UInt) -> c.int ---
/**
* Change the threads current priority.
@@ -366,7 +365,7 @@ foreign threadmgr {
*
* @return 0 if successful, otherwise the error code.
*/
ChangeThreadPriority :: proc(thid: sce.UID, priority: c.int) -> c.int ---
sceKernelChangeThreadPriority :: proc(thid: sce.UID, priority: c.int) -> c.int ---
/**
@@ -376,7 +375,7 @@ foreign threadmgr {
*
* @return The free size.
*/
GetThreadStackFreeSize :: proc(thid: sce.UID) -> c.int ---
sceKernelGetThreadStackFreeSize :: proc(thid: sce.UID) -> c.int ---
/**
* Retrive the cpu affinity mask of a thread.
@@ -385,7 +384,7 @@ foreign threadmgr {
*
* @return current affinity mask if >= 0, otherwise the error code.
*/
GetThreadCpuAffinityMask :: proc(thid: sce.UID) -> c.int ---
sceKernelGetThreadCpuAffinityMask :: proc(thid: sce.UID) -> c.int ---
/**
* Set the cpu affinity mask of a thread.
@@ -395,14 +394,14 @@ foreign threadmgr {
*
* @return 0 if successful, otherwise the error code.
*/
ChangeThreadCpuAffinityMask :: proc(thid: sce.UID, mask: c.int) -> c.int ---
sceKernelChangeThreadCpuAffinityMask :: proc(thid: sce.UID, mask: c.int) -> c.int ---
/**
* Get the process ID of in the running thread.
*
* @return process ID of in the running thread
*/
GetProcessId :: proc() -> sce.UID ---
sceKernelGetProcessId :: proc() -> sce.UID ---
/**
* Get the type of a Threadmgr uid
@@ -411,7 +410,7 @@ foreign threadmgr {
*
* @return The type, < 0 on error
*/
GetThreadmgrUIDClass :: proc(uid: sce.UID) -> SceKernelIdListType ---
sceKernelGetThreadmgrUIDClass :: proc(uid: sce.UID) -> SceKernelIdListType ---
/**
@@ -420,7 +419,7 @@ foreign threadmgr {
* @param key - the TLS keyslot index
* @return pointer to TLS memory
*/
GetThreadTLSAddr :: proc(thid: sce.UID, key: c.int) -> rawptr ---
sceKernelGetThreadTLSAddr :: proc(thid: sce.UID, key: c.int) -> rawptr ---
/**
@@ -428,6 +427,5 @@ foreign threadmgr {
*
* @return The system time
*/
GetSystemTimeWide :: proc() -> sce.Int64 ---
sceKernelGetSystemTimeWide :: proc() -> sce.Int64 ---
}