source:
trunk/IPs/systemC/processor/Morpheo/Common/src/Debug.cpp
@
99
Last change on this file since 99 was 97, checked in by , 16 years ago | |
---|---|
|
|
File size: 697 bytes |
Rev | Line | |
---|---|---|
[82] | 1 | /* |
2 | * $Id: Debug.cpp 97 2008-12-19 15:34:00Z rosiere $ | |
3 | * | |
4 | * [ Description ] | |
5 | * | |
6 | */ | |
7 | ||
[78] | 8 | #include "Common/include/Debug.h" |
[88] | 9 | #include "Common/include/Environment.h" |
[78] | 10 | |
[88] | 11 | namespace morpheo { |
12 | ||
[97] | 13 | #ifdef DEBUG |
14 | static bool debug_initialized; | |
15 | #endif | |
16 | debug_verbosity_t debug; | |
[78] | 17 | |
[88] | 18 | #undef FUNCTION |
[97] | 19 | #define FUNCTION "debug_init" |
20 | void debug_init (void) | |
[78] | 21 | { |
[97] | 22 | #ifdef DEBUG |
23 | if (not debug_initialized) | |
24 | { | |
25 | debug = DEBUG; | |
[78] | 26 | |
[97] | 27 | // debug_initialized = true; |
28 | } | |
29 | #endif | |
[78] | 30 | } |
31 | ||
[88] | 32 | #undef FUNCTION |
[97] | 33 | #define FUNCTION "debug_init" |
34 | void debug_init (debug_verbosity_t level) | |
[78] | 35 | { |
[97] | 36 | #ifdef DEBUG |
37 | if (not debug_initialized) | |
38 | { | |
39 | // Take min | |
40 | debug = (level < DEBUG)?level:DEBUG; | |
41 | ||
42 | debug_initialized = true; | |
43 | } | |
44 | #endif | |
[78] | 45 | } |
[88] | 46 | |
47 | }; // end namespace morpheo |
Note: See TracBrowser
for help on using the repository browser.