X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FKernel%2Finclude%2Facess.h;h=3abc49ab86fc5645fcbe8b3f7eaa5cf20894ff89;hb=35bd78fa5f141882c43b1bcaa0c90436ff3974f1;hp=e673290a6a18cdcb09a29c2766282018cca1214f;hpb=9dccbc6f16485ea62caa8c4153f6f878da8cbb0d;p=tpg%2Facess2.git diff --git a/KernelLand/Kernel/include/acess.h b/KernelLand/Kernel/include/acess.h index e673290a..3abc49ab 100644 --- a/KernelLand/Kernel/include/acess.h +++ b/KernelLand/Kernel/include/acess.h @@ -15,6 +15,8 @@ #define PACKED __attribute__((packed)) //! Mark a function as not returning #define NORETURN __attribute__((noreturn)) +//! Mark a function that its return value should be used +#define WARN_UNUSED_RET __attribute__((warn_unused_result)) //! Mark a function (or variable) as deprecated #define DEPRECATED __attribute__((deprecated)) //! Mark a parameter as unused @@ -60,7 +62,8 @@ typedef Uint64 off_t; //!< VFS Offset extern char __buildnum[]; #define BUILD_NUM ((int)(Uint)&__buildnum) -extern const char gsGitHash[]; +extern const char gsGitHash[]; +extern const char gsBuildInfo[]; #define VER2(major,minor) ((((major)&0xFF)<<8)|((minor)&0xFF)) /** @@ -252,7 +255,7 @@ extern int MM_Map(tVAddr VAddr, tPAddr PAddr); * \param Addr Address of the page to get the physical address of * \return Physical page mapped at \a Addr */ -extern tPAddr MM_GetPhysAddr(tVAddr Addr); +extern tPAddr MM_GetPhysAddr(const void *Addr); /** * \brief Set the access flags on a page * \param VAddr Virtual address of the page @@ -425,6 +428,7 @@ extern int strucmp(const char *Str1, const char *Str2); extern char *_strdup(const char *File, int Line, const char *Str); extern char **str_split(const char *__str, char __ch); extern char *strchr(const char *__s, int __c); +extern char *strrchr(const char *__s, int __c); extern int strpos(const char *Str, char Ch); extern int strpos8(const char *str, Uint32 search); extern void itoa(char *buf, Uint64 num, int base, int minLength, char pad); @@ -442,6 +446,8 @@ extern int UnHex(Uint8 *Dest, size_t DestSize, const char *SourceString); * \} */ +#include + /** * \brief Get a random number * \return Random number @@ -482,10 +488,12 @@ extern int Module_LoadFile(const char *Path, const char *ArgStr); */ /** * \brief Create a timestamp from a time + * \note Days/Months are zero-based (e.g. December is 11, and has a day range of 0-30) */ extern tTime timestamp(int sec, int mins, int hrs, int day, int month, int year); /** * \brief Extract the date/time from a timestamp + * \note Days/Months are zero-based (e.g. December is 11, and has a day range of 0-30) */ extern void format_date(tTime TS, int *year, int *month, int *day, int *hrs, int *mins, int *sec, int *ms); /**