X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Facess.h;h=394f9f1ed7c423e4e79c7eaa80153d37cdb4a70b;hb=eecce4b7a55315f6c385ad8be35c25dbb12d43d8;hp=09c4f5177edba7e3c8b3537e272862f107db6e2a;hpb=eb934b266052965b9c480d11d6866a994f30731b;p=tpg%2Facess2.git diff --git a/Kernel/include/acess.h b/Kernel/include/acess.h index 09c4f517..394f9f1e 100644 --- a/Kernel/include/acess.h +++ b/Kernel/include/acess.h @@ -8,7 +8,7 @@ #define NULL ((void*)0) #define PACKED __attribute__ ((packed)) -#include +//#include #include #include #include "errno.h" @@ -95,9 +95,6 @@ typedef struct sKernelSymbol { */ // === FUNCTIONS === -// --- Core --- -extern void System_Init(char *ArgString); - // --- IRQs --- extern int IRQ_AddHandler(int Num, void (*Callback)(int)); @@ -195,12 +192,6 @@ extern int MM_Map(tVAddr VAddr, tPAddr PAddr); * \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 @@ -208,6 +199,18 @@ extern int MM_IsUser(tVAddr VAddr); * \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 @@ -315,6 +318,7 @@ 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 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);