*/
/**
- * \name Per-Process Configuration Settings
+ * \name Per-Thread Configuration Settings
* \{
*/
enum eConfigTypes {
CFG_VFS_CWD,
CFG_VFS_MAXFILES,
CFG_VFS_CHROOT,
+ CFG_ERRNO,
NUM_CFG_ENTRIES
};
#define CFGINT(id) (*Threads_GetCfgPtr(id))
#define CFGPTR(id) (*(void**)Threads_GetCfgPtr(id))
+
+#define errno (CFGINT(CFG_ERRNO))
/**
* \}
*/
* \return Reference count for the page
*/
extern int MM_GetRefCount(tPAddr PAddr);
+/**
+ * \brief Set the node associated with a page
+ * \param PAddr Physical address of page
+ * \param Node Node pointer (tVFS_Node)
+ * \return Boolean failure
+ * \retval 0 Success
+ * \retval 1 Page not allocated
+ */
+extern int MM_SetPageNode(tPAddr PAddr, void *Node);
+/**
+ * \brief Get the node associated with a page
+ * \param PAddr Physical address of page
+ * \param Node Node pointer (tVFS_Node) destination
+ * \return Boolean failure
+ * \retval 0 Success
+ * \retval 1 Page not allocated
+ */
+extern int MM_GetPageNode(tPAddr PAddr, void **Node);
/**
* \}
*/
extern size_t strlen(const char *Str);
extern char *strcpy(char *__dest, const char *__src);
extern char *strncpy(char *__dest, const char *__src, size_t max);
+extern char *strcat(char *__dest, const char *__src);
+extern char *strncat(char *__dest, const char *__src, size_t n);
extern int strcmp(const char *__str1, const char *__str2);
extern int strncmp(const char *Str1, const char *Str2, size_t num);
extern int strucmp(const char *Str1, const char *Str2);
* \{
*/
extern int Proc_SpawnWorker(void);
-extern int Proc_Spawn(char *Path);
+extern int Proc_Spawn(const char *Path);
extern void Threads_Exit(int TID, int Status);
extern void Threads_Yield(void);
extern void Threads_Sleep(void);
#include <binary_ext.h>
#include <vfs_ext.h>
-#include <adt.h>
#include <mutex.h>
#endif