X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Kernel%2Finclude%2Facess.h;h=7afdb5e1adb0782ee726a0ac2ed339342e5f9216;hb=049de1f2533477716a12a708c097b199eaa8fb6c;hp=65a4b6e07b34ba9bca9f20ef2fdef71888f325eb;hpb=f2fd50e797e6a3b3590e4c2e13b6782dd87c25a2;p=tpg%2Facess2.git diff --git a/Kernel/include/acess.h b/Kernel/include/acess.h index 65a4b6e0..7afdb5e1 100644 --- a/Kernel/include/acess.h +++ b/Kernel/include/acess.h @@ -8,6 +8,7 @@ #define NULL ((void*)0) #define PACKED __attribute__ ((packed)) +#include #include #include #include "errno.h" @@ -100,6 +101,15 @@ extern void System_Init(char *ArgString); // --- IRQs --- extern int IRQ_AddHandler(int Num, void (*Callback)(int)); +// --- Logging --- +extern void Log_KernelPanic(char *Ident, char *Message, ...); +extern void Log_Panic(char *Ident, char *Message, ...); +extern void Log_Error(char *Ident, char *Message, ...); +extern void Log_Warning(char *Ident, char *Message, ...); +extern void Log_Notice(char *Ident, char *Message, ...); +extern void Log_Log(char *Ident, char *Message, ...); +extern void Log_Debug(char *Ident, char *Message, ...); + // --- Debug --- /** * \name Debugging and Errors @@ -179,11 +189,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 @@ -214,7 +224,7 @@ extern void MM_FreeTemp(tVAddr VAddr); * \param PAddr Physical address to map in * \param Number Number of pages to map */ -extern tVAddr MM_MapHWPage(tPAddr PAddr, Uint Number); +extern tVAddr MM_MapHWPages(tPAddr PAddr, Uint Number); /** * \brief Allocates DMA physical memory * \param Pages Number of pages required @@ -228,7 +238,7 @@ extern tVAddr MM_AllocDMA(int Pages, int MaxBits, tPAddr *PhysAddr); * \param VAddr Virtual address allocate by ::MM_MapHWPage or ::MM_AllocDMA * \param Number Number of pages to free */ -extern void MM_UnmapHWPage(tVAddr VAddr, Uint Number); +extern void MM_UnmapHWPages(tVAddr VAddr, Uint Number); /** * \brief Allocate a single physical page * \return Physical address allocated @@ -295,9 +305,11 @@ extern Uint32 BigEndian32(Uint32 Val); * \name Strings * \{ */ +extern int vsnprintf(char *__s, size_t __maxlen, const char *__format, va_list args); extern int sprintf(char *__s, const char *__format, ...); extern Uint strlen(const char *Str); extern char *strcpy(char *__dest, const char *__src); +extern char *strncpy(char *__dest, const char *__src, size_t max); 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); @@ -369,12 +381,14 @@ extern int Proc_Spawn(char *Path); extern void Threads_Exit(); extern void Threads_Yield(); extern void Threads_Sleep(); +extern void Threads_WakeTID(tTID Thread); extern tPID Threads_GetPID(); extern tTID Threads_GetTID(); extern tUID Threads_GetUID(); extern tGID Threads_GetGID(); extern int SpawnTask(tThreadFunction Function, void *Arg); extern Uint *Threads_GetCfgPtr(int Id); +extern int Threads_SetName(char *NewName); /** * \} */