author | mikaruus <mika.a.ruuskanen@nokia.com> |
Thu, 14 Jan 2010 10:44:58 +0200 | |
changeset 5 | 8ccc39f9d787 |
parent 0 | 63b37f68c1ce |
permissions | -rw-r--r-- |
0 | 1 |
/* |
2 |
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 |
* All rights reserved. |
|
4 |
* This component and the accompanying materials are made available |
|
5 |
* under the terms of the License "Eclipse Public License v1.0" |
|
6 |
* which accompanies this distribution, and is available |
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 |
* |
|
9 |
* Initial Contributors: |
|
10 |
* Nokia Corporation - initial contribution. |
|
11 |
* |
|
12 |
* Contributors: |
|
13 |
* |
|
14 |
* Description: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef _MEMMANAGERTRACE_H_ |
|
20 |
#define _MEMMANAGERTRACE_H_ |
|
21 |
||
22 |
// INCLUDES |
|
23 |
#include <kernel.h> |
|
24 |
||
25 |
// CONSTANTS |
|
26 |
||
27 |
const TUint8 KFaultIdentifierShift = 8; |
|
28 |
const TUint8 KChannelNumberShift = 16; |
|
29 |
const TUint8 KExtraInfoShift = 24; |
|
30 |
||
31 |
// Identifies in which class assert happened. |
|
32 |
enum FaultClassCategories |
|
33 |
{ |
|
34 |
EDMemmanagerTraceId = 0, |
|
35 |
}; |
|
36 |
||
37 |
const TUint8 KClassIdentifierShift( 8 ); |
|
38 |
||
39 |
// MACROS |
|
40 |
#define _T( a ) a |
|
41 |
#define __TRACE_PRINTF(a) Kern::Printf a |
|
42 |
||
43 |
#ifdef _DEBUG |
|
44 |
#if defined COMPONENT_TRACE_FLAG |
|
45 |
#define C_TRACE(a) __TRACE_PRINTF(a) |
|
46 |
#else |
|
47 |
#define C_TRACE(a) |
|
48 |
#endif // COMPONENT_TRACE_FLAG |
|
49 |
#else // _DEBUG |
|
50 |
#define C_TRACE(a) |
|
51 |
#endif // _DEBUG |
|
52 |
// |
|
53 |
||
54 |
// Resets are made both in UDEB and UREL (traces only in udeb) |
|
55 |
// Internal asserts |
|
5
8ccc39f9d787
New release based on our 2010wk02 release
mikaruus <mika.a.ruuskanen@nokia.com>
parents:
0
diff
changeset
|
56 |
#define TRACE_ASSERT_ALWAYS __TRACE_PRINTF( ("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__) ) |
0 | 57 |
#define ASSERT_RESET_ALWAYS(a,b) if(!(a)) { __TRACE_PRINTF(("Assertion failed: file=" __FILE__ ", line=%d, compiled="__DATE__" "__TIME__, __LINE__)); Kern::Fault( "ISCE MemMgr:", b ); } |
58 |
#define ASSERT_THREAD_CONTEXT_ALWAYS( a )ASSERT_RESET_ALWAYS( NKern::CurrentContext() == NKern::EThread, a ); |
|
59 |
||
60 |
#endif // _MEMMANAGERTRACE_H_ |
|
61 |
||
62 |
// End of File |