summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/kernel/kernel/threadmgr.h37
-rw-r--r--nids/360/SceKernelThreadMgr.yml3
2 files changed, 33 insertions, 7 deletions
diff --git a/include/kernel/kernel/threadmgr.h b/include/kernel/kernel/threadmgr.h
index b81ee23..9b4de5e 100644
--- a/include/kernel/kernel/threadmgr.h
+++ b/include/kernel/kernel/threadmgr.h
@@ -120,16 +120,41 @@ void *sceKernelGetThreadTLSAddr(SceUID thid, int key);
*/
void *sceKernelGetTLSAddr(int key);
+/** Type of function used with sceKernelExtendKernelStack */
+typedef SceInt32 (*SceKernelExtendKernelStackFunction)(void *pArg);
+
+/** Type of function used with sceKernelExtendKernelStackWide */
+typedef SceInt64 (*SceKernelExtendKernelStackWideFunction)(void *pArg);
+
/**
- * @brief Runs a function with larger stack size
+ * @brief Changes the stack address range and calls extendKernelStackFunc
*
- * @param[in] stack_size The stack size
- * @param[in] to_call To call
- * @param args The arguments
+ * @param[in] stackSize Size of the changed stack
+ * @param[in] extendKernelStackFunc Function to call
+ * @param[in] pCommon Argument to pass to extendKernelStackFunc
*
- * @return Zero on success
+ * @return Return value of extendKernelStackFunc
+ */
+SceInt32 sceKernelExtendKernelStack(
+ SceSize stackSize,
+ SceKernelExtendKernelStackFunction extendKernelStackFunc,
+ void *pCommon
+);
+
+/**
+ * @brief Changes the stack address range and calls extendKernelStackWideFunc
+ *
+ * @param[in] stackSize Size of the changed stack
+ * @param[in] extendKernelStackWideFunc Function to call
+ * @param[in] pCommon Argument to pass to extendKernelStackWideFunc
+ *
+ * @return Return value of extendKernelStackWideFunc
*/
-int sceKernelRunWithStack(SceSize stack_size, int (* to_call)(void *), void *args);
+SceInt64 sceKernelExtendKernelStackWide(
+ SceSize stackSize,
+ SceKernelExtendKernelStackWideFunction extendKernelStackWideFunc,
+ void *pCommon
+);
/**
* @brief Call from an abort handler to get info on faulting process
diff --git a/nids/360/SceKernelThreadMgr.yml b/nids/360/SceKernelThreadMgr.yml
index 13f1c91..d813a34 100644
--- a/nids/360/SceKernelThreadMgr.yml
+++ b/nids/360/SceKernelThreadMgr.yml
@@ -112,6 +112,8 @@ modules:
sceKernelEnqueueWorkQueue: 0xE50E1185
sceKernelExitDeleteThread: 0x1D17DECF
sceKernelExitThread: 0x0C8A38E1
+ sceKernelExtendKernelStack: 0xE54FD746
+ sceKernelExtendKernelStackWide: 0xA2C801A5
sceKernelFinalizeFastMutex: 0x11FE84A1
sceKernelGetCallbackCount: 0x0892D8DF
sceKernelGetFastMutexInfo: 0xD7AF2E58
@@ -146,7 +148,6 @@ modules:
sceKernelReceiveMsgPipeVectorCB: 0xDA5C9AC6
sceKernelRegisterCallbackToEvent: 0x832A7E0C
sceKernelRegisterTimer: 0xC58DF384
- sceKernelRunWithStack: 0xE54FD746
sceKernelSendMsgPipeVector: 0x67DD3BAD
sceKernelSetEvent: 0x9EA3A45C
sceKernelSetEventFlag: 0xD4780C3E