git.ucc.asn.au
/
tpg
/
acess2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Kernel/syscalls - Added syscall for Time_Wait
[tpg/acess2.git]
/
KernelLand
/
Kernel
/
include
/
logdebug.h
diff --git
a/KernelLand/Kernel/include/logdebug.h
b/KernelLand/Kernel/include/logdebug.h
index
80cb1c9
..
c533743
100644
(file)
--- a/
KernelLand/Kernel/include/logdebug.h
+++ b/
KernelLand/Kernel/include/logdebug.h
@@
-35,6
+35,7
@@
extern void Debug_KernelPanic(void); //!< Initiate a kernel panic
extern void Panic(const char *Msg, ...); //!< Print a panic message (initiates a kernel panic)
extern void Warning(const char *Msg, ...); //!< Print a warning message
extern void LogF(const char *Fmt, ...); //!< Print a log message without a trailing newline
extern void Panic(const char *Msg, ...); //!< Print a panic message (initiates a kernel panic)
extern void Warning(const char *Msg, ...); //!< Print a warning message
extern void LogF(const char *Fmt, ...); //!< Print a log message without a trailing newline
+extern void LogFV(const char *Fmt, va_list Args); //!< va_list non-newline log message
extern void Log(const char *Fmt, ...); //!< Print a log message
extern void Debug(const char *Fmt, ...); //!< Print a debug message (doesn't go to KTerm)
extern void LogV(const char *Fmt, va_list Args); //!< va_list Log message
extern void Log(const char *Fmt, ...); //!< Print a log message
extern void Debug(const char *Fmt, ...); //!< Print a debug message (doesn't go to KTerm)
extern void LogV(const char *Fmt, va_list Args); //!< va_list Log message
@@
-57,10
+58,16
@@
extern void Debug_HexDump(const char *Header, const void *Data, size_t Length);
# define LEAVE_RET0() return
#endif
#if !DISABLE_ASSERTS
# define LEAVE_RET0() return
#endif
#if !DISABLE_ASSERTS
-# define ASSERT(expr) do{if(!(expr))Panic("%s:%i - %s: Assertion '"#expr"' failed",__FILE__,__LINE__,(char*)__func__);}while(0)
+# define ASSERTV(expr,msg,args...) do{if(!(expr))Panic("%s:%i - %s: Assertion '"#expr"' failed"msg,__FILE__,__LINE__,(char*)__func__,##args);}while(0)
+# define ASSERTRV(expr,rv,msg,args...) do{if(!(expr)){Warning("%s:%i: Assertion '"#expr"' failed"msg,__FILE__,__LINE__,(char*)__func__ , ##args);return rv;}}while(0)
#else
#else
-# define ASSERT(expr)
+# define ASSERTV(expr)
+# define ASSERTRV(expr)
#endif
#endif
+#define ASSERT(expr) ASSERTV(expr, "")
+#define ASSERTR(expr,rv) ASSERTRV(expr, rv, "")
+#define ASSERTC(l,rel,r) ASSERTV(l rel r, ": %i"#rel"%i", l, r)
+#define ASSERTCR(l,rel,r,rv) ASSERTRV(l rel r, rv, ": %i"#rel"%i", l, r)
/**
* \}
*/
/**
* \}
*/
UCC
git Repository :: git.ucc.asn.au