546 */ |
556 */ |
547 extern "C" TInt CheckPreconditions(TUint32 aConditionMask, const char* aFunction, TLinAddr aAddr); |
557 extern "C" TInt CheckPreconditions(TUint32 aConditionMask, const char* aFunction, TLinAddr aAddr); |
548 /** |
558 /** |
549 @internalComponent |
559 @internalComponent |
550 */ |
560 */ |
551 #define CHECK_PRECONDITIONS(mask,function) CheckPreconditions(mask,function,0) |
561 #define CHECK_PRECONDITIONS(mask,function) CheckPreconditions(mask,function,PRECOND_FUNCTION_CALLER) |
552 |
562 |
553 #ifdef __KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
563 #ifdef __KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
554 |
564 |
555 /** |
565 /** |
556 @internalComponent |
566 @internalComponent |
557 */ |
567 */ |
558 #define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \ |
568 #define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \ |
559 __ASSERT_DEBUG( (cond), ( \ |
569 __ASSERT_DEBUG( (cond), ( \ |
560 DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function),\ |
570 DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER),\ |
561 NKFault(function, 0))) |
571 NKFault(function, 0))) |
562 |
572 |
563 #else//!__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
573 #else//!__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
564 /** |
574 /** |
565 @internalComponent |
575 @internalComponent |
566 */ |
576 */ |
567 #define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \ |
577 #define __ASSERT_WITH_MESSAGE_DEBUG(cond,message,function) \ |
568 __ASSERT_DEBUG( (cond), \ |
578 __ASSERT_DEBUG( (cond), \ |
569 DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function)) |
579 DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER)) |
570 |
580 |
571 |
581 |
572 #endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
582 #endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
573 #endif//(!defined (__KERNEL_APIS_CONTEXT_CHECKS_WARNING__)&&!defined (__KERNEL_APIS_CONTEXT_CHECKS_FAULT__)) |
583 #endif//(!defined (__KERNEL_APIS_CONTEXT_CHECKS_WARNING__)&&!defined (__KERNEL_APIS_CONTEXT_CHECKS_FAULT__)) |
574 |
584 |
586 /** |
596 /** |
587 @internalComponent |
597 @internalComponent |
588 */ |
598 */ |
589 #define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \ |
599 #define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \ |
590 __ASSERT_ALWAYS( (cond), ( \ |
600 __ASSERT_ALWAYS( (cond), ( \ |
591 DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function),\ |
601 DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER),\ |
592 NKFault(function, 0))) |
602 NKFault(function, 0))) |
593 #else |
603 #else |
594 /** |
604 /** |
595 @internalComponent |
605 @internalComponent |
596 */ |
606 */ |
597 #define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \ |
607 #define __ASSERT_WITH_MESSAGE_ALWAYS(cond,message,function) \ |
598 __ASSERT_ALWAYS( (cond), \ |
608 __ASSERT_ALWAYS( (cond), \ |
599 DEBUGPRINT("Assertion failed: %s\nFunction: %s\n",message,function)) |
609 DEBUGPRINT("Assertion failed: %s\nFunction: %s; called from: %08x\n",message,function,PRECOND_FUNCTION_CALLER)) |
600 #endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
610 #endif//__KERNEL_APIS_CONTEXT_CHECKS_FAULT__ |
601 #endif//(!defined (__KERNEL_APIS_CONTEXT_CHECKS_WARNING__)&&!defined (__KERNEL_APIS_CONTEXT_CHECKS_FAULT__)) |
611 #endif//(!defined (__KERNEL_APIS_CONTEXT_CHECKS_WARNING__)&&!defined (__KERNEL_APIS_CONTEXT_CHECKS_FAULT__)) |
602 |
612 |
603 #endif |
613 #endif |