--- a/kernel/eka/include/nkernsmp/nk_priv.h Thu Jan 07 13:38:45 2010 +0200
+++ b/kernel/eka/include/nkernsmp/nk_priv.h Mon Jan 18 21:31:10 2010 +0200
@@ -781,6 +781,17 @@
//declarations for the checking of kernel preconditions
+
+/**
+@internalComponent
+
+PRECOND_FUNCTION_CALLER is needed for __ASSERT_WITH_MESSAGE_ALWAYS(),
+so is outside the #ifdef _DEBUG.
+*/
+#ifndef PRECOND_FUNCTION_CALLER
+#define PRECOND_FUNCTION_CALLER 0
+#endif
+
#ifdef _DEBUG
/**
@@ -816,7 +827,7 @@
/**
@internalComponent
*/
-#define CHECK_PRECONDITIONS(mask,function) CheckPreconditions(mask,function,0)
+#define CHECK_PRECONDITIONS(mask,function) CheckPreconditions(mask,function,PRECOND_FUNCTION_CALLER)
#ifdef __KERNEL_APIS_CONTEXT_CHECKS_FAULT__
@@ -825,7 +836,7 @@
*/
#define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \
__ASSERT_DEBUG( (cond), ( \
- DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function),\
+ DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER),\
NKFault(function, 0)))
#else//!__KERNEL_APIS_CONTEXT_CHECKS_FAULT__
@@ -834,7 +845,7 @@
*/
#define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \
__ASSERT_DEBUG( (cond), \
- DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function))
+ DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER))
#endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__
@@ -856,7 +867,7 @@
*/
#define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \
__ASSERT_ALWAYS( (cond), ( \
- DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function),\
+ DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER),\
NKFault(function, 0)))
#else
/**
@@ -864,7 +875,7 @@
*/
#define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \
__ASSERT_ALWAYS( (cond), \
- DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function))
+ DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER))
#endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__
#endif//(!defined (__KERNEL_APIS_CONTEXT_CHECKS_WARNING__)&&!defined (__KERNEL_APIS_CONTEXT_CHECKS_FAULT__))