#define NULL ((void*)0)
#define PACKED __attribute__ ((packed))
-#include <stdint.h>
+//#include <stdint.h>
#include <arch.h>
#include <stdarg.h>
#include "errno.h"
*/
// === FUNCTIONS ===
-// --- Core ---
-extern void System_Init(char *ArgString);
-
// --- IRQs ---
extern int IRQ_AddHandler(int Num, void (*Callback)(int));
* \return Physical page mapped at \a Addr
*/
extern tPAddr MM_GetPhysAddr(tVAddr Addr);
-/**
- * \brief Checks is a memory range is user accessable
- * \param VAddr Base address to check
- * \return 1 if the memory is all user-accessable, 0 otherwise
- */
-extern int MM_IsUser(tVAddr VAddr);
/**
* \brief Set the access flags on a page
* \param VAddr Virtual address of the page
* \param Mask Flags to set
*/
extern void MM_SetFlags(tVAddr VAddr, Uint Flags, Uint Mask);
+/**
+ * \brief Get the flags on a flag
+ * \param VAddr Virtual address of page
+ * \return Flags value of the page
+ */
+extern Uint MM_GetFlags(tVAddr VAddr);
+/**
+ * \brief Checks is a memory range is user accessable
+ * \param VAddr Base address to check
+ * \return 1 if the memory is all user-accessable, 0 otherwise
+ */
+#define MM_IsUser(VAddr) (!(MM_GetFlags((VAddr))&MM_PFLAG_KERNEL))
/**
* \brief Temporarily map a page into the address space
* \param PAddr Physical addres to map
extern int strncmp(const char *Str1, const char *Str2, size_t num);
extern int strucmp(const char *Str1, const char *Str2);
extern char *strdup(const char *Str);
+extern char **str_split(const char *__str, char __ch);
extern int strpos(const char *Str, char Ch);
extern int strpos8(const char *str, Uint32 search);
extern void itoa(char *buf, Uint num, int base, int minLength, char pad);