814 */ |
825 */ |
815 extern "C" TInt CheckPreconditions(TUint32 aConditionMask, const char* aFunction, TLinAddr aAddr); |
826 extern "C" TInt CheckPreconditions(TUint32 aConditionMask, const char* aFunction, TLinAddr aAddr); |
816 /** |
827 /** |
817 @internalComponent |
828 @internalComponent |
818 */ |
829 */ |
819 #define CHECK_PRECONDITIONS(mask,function) CheckPreconditions(mask,function,0) |
830 #define CHECK_PRECONDITIONS(mask,function) CheckPreconditions(mask,function,PRECOND_FUNCTION_CALLER) |
820 |
831 |
821 #ifdef __KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
832 #ifdef __KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
822 |
833 |
823 /** |
834 /** |
824 @internalComponent |
835 @internalComponent |
825 */ |
836 */ |
826 #define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \ |
837 #define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \ |
827 __ASSERT_DEBUG( (cond), ( \ |
838 __ASSERT_DEBUG( (cond), ( \ |
828 DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function),\ |
839 DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER),\ |
829 NKFault(function, 0))) |
840 NKFault(function, 0))) |
830 |
841 |
831 #else//!__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
842 #else//!__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
832 /** |
843 /** |
833 @internalComponent |
844 @internalComponent |
834 */ |
845 */ |
835 #define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \ |
846 #define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \ |
836 __ASSERT_DEBUG( (cond), \ |
847 __ASSERT_DEBUG( (cond), \ |
837 DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function)) |
848 DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER)) |
838 |
849 |
839 |
850 |
840 #endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
851 #endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
841 #endif//(!defined (__KERNEL_APIS_CONTEXT_CHECKS_WARNING__)&&!defined (__KERNEL_APIS_CONTEXT_CHECKS_FAULT__)) |
852 #endif//(!defined (__KERNEL_APIS_CONTEXT_CHECKS_WARNING__)&&!defined (__KERNEL_APIS_CONTEXT_CHECKS_FAULT__)) |
842 |
853 |
854 /** |
865 /** |
855 @internalComponent |
866 @internalComponent |
856 */ |
867 */ |
857 #define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \ |
868 #define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \ |
858 __ASSERT_ALWAYS( (cond), ( \ |
869 __ASSERT_ALWAYS( (cond), ( \ |
859 DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function),\ |
870 DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER),\ |
860 NKFault(function, 0))) |
871 NKFault(function, 0))) |
861 #else |
872 #else |
862 /** |
873 /** |
863 @internalComponent |
874 @internalComponent |
864 */ |
875 */ |
865 #define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \ |
876 #define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \ |
866 __ASSERT_ALWAYS( (cond), \ |
877 __ASSERT_ALWAYS( (cond), \ |
867 DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function)) |
878 DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER)) |
868 #endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
879 #endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
869 #endif//(!defined (__KERNEL_APIS_CONTEXT_CHECKS_WARNING__)&&!defined (__KERNEL_APIS_CONTEXT_CHECKS_FAULT__)) |
880 #endif//(!defined (__KERNEL_APIS_CONTEXT_CHECKS_WARNING__)&&!defined (__KERNEL_APIS_CONTEXT_CHECKS_FAULT__)) |
870 |
881 |
871 #endif |
882 #endif |