* \brief Start preemptive multithreading (if needed)
*/
extern void Proc_Start(void);
+/**
+ * \brief Called just before a thread is freed
+ */
+extern void Proc_ClearThread(tThread *Thread);
+/**
+ * \brief Called just before a process is freed
+ */
+extern void Proc_ClearProcess(tProcess *Process);
/**
* \brief Get the ID of this CPU
* \return Zero based CPU ID
* \param DataSize Size of the \a ArgV buffer in bytes
* \note This function should free \a ArgV
*/
-extern void Proc_StartUser(Uint Entrypoint, Uint Base, int ArgC, char **ArgV, int DataSize) NORETURN;
+extern void Proc_StartUser(Uint Entrypoint, Uint Base, int ArgC, const char **ArgV, int DataSize) NORETURN;
/**
* \brief Call the fault handler for a thread
* \param Thread Thread that is at fault :)
/**
* \brief Clear the user's memory space back to the minimum required to run
*/
-extern tPAddr MM_ClearUser(void);
+extern void MM_ClearUser(void);
/**
* \brief Dump the address space to the debug channel
* \param Start First address
*/
extern void MM_DumpTables(tVAddr Start, tVAddr End);
+/**
+ * \brief Check if a buffer is valid (and all user if originally user)
+ * \param Addr Base address
+ * \param Size Size of the buffer in bytes
+ * \return Boolean valid (0: invalid, non-0: Valid)
+ */
+extern int MM_IsValidBuffer(tVAddr Addr, size_t Size);
#endif