X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;ds=sidebyside;f=Kernel%2Finclude%2Facess.h;h=ddf69cbac2fedc7fc1d92fd16b0e112cf60cbc3a;hb=c3d486ba13c6cd12558d4c0cf01d3fd93e797d64;hp=930e32389ab6617073e64138f4254eca99ffc645;hpb=6ea2f6040da80c963882f6ccfe4bf21ff048eaff;p=tpg%2Facess2.git diff --git a/Kernel/include/acess.h b/Kernel/include/acess.h index 930e3238..ddf69cba 100644 --- a/Kernel/include/acess.h +++ b/Kernel/include/acess.h @@ -8,11 +8,14 @@ #define NULL ((void*)0) #define PACKED __attribute__ ((packed)) +#include #include #include #include "errno.h" // --- Types --- +typedef int tPID; +typedef int tTID; typedef Uint tUID; typedef Uint tGID; typedef Sint64 tTimestamp; @@ -177,11 +180,11 @@ extern void MM_Deallocate(tVAddr VAddr); */ extern int MM_Map(tVAddr VAddr, tPAddr PAddr); /** - * \brief Get the physical address of \a VAddr - * \param VAddr Address of the page to get the physical address of - * \return Physical page mapped at \a VAddr + * \brief Get the physical address of \a Addr + * \param Addr Address of the page to get the physical address of + * \return Physical page mapped at \a Addr */ -extern tPAddr MM_GetPhysAddr(tVAddr VAddr); +extern tPAddr MM_GetPhysAddr(tVAddr Addr); /** * \brief Checks is a memory range is user accessable * \param VAddr Base address to check @@ -257,11 +260,11 @@ extern void MM_DerefPhys(tPAddr PAddr); * \name Memory Manipulation * \{ */ -extern int memcmp(const void *m1, const void *m2, Uint count); -extern void *memcpy(void *dest, const void *src, Uint count); -extern void *memcpyd(void *dest, const void *src, Uint count); -extern void *memset(void *dest, int val, Uint count); -extern void *memsetd(void *dest, Uint val, Uint count); +extern int memcmp(const void *m1, const void *m2, size_t count); +extern void *memcpy(void *dest, const void *src, size_t count); +extern void *memcpyd(void *dest, const void *src, size_t count); +extern void *memset(void *dest, int val, size_t count); +extern void *memsetd(void *dest, Uint32 val, size_t count); /** * \} */ @@ -303,6 +306,7 @@ extern char *strdup(const char *Str); 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); +extern int atoi(const char *string); extern int ReadUTF8(Uint8 *str, Uint32 *Val); extern int WriteUTF8(Uint8 *str, Uint32 Val); extern int ModUtil_SetIdent(char *Dest, char *Value); @@ -366,6 +370,8 @@ extern int Proc_Spawn(char *Path); extern void Threads_Exit(); extern void Threads_Yield(); extern void Threads_Sleep(); +extern tPID Threads_GetPID(); +extern tTID Threads_GetTID(); extern tUID Threads_GetUID(); extern tGID Threads_GetGID(); extern int SpawnTask(tThreadFunction Function, void *Arg);