Changeset 1007
- Timestamp:
- 04/23/08 03:23:04 (13 years ago)
- Files:
-
- trunk/libffado/config.h.in (modified) (1 diff)
- trunk/libffado/src/debugmodule/debugmodule.cpp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/libffado/config.h.in
r1005 r1007 44 44 // debug logging in the critical sections 45 45 #define DEBUG_EXTREME_ENABLE 0 46 47 // use a RT-safe message buffer for debug output 48 // useful to disable this when the code aborts/segfaults to 49 // not lose debug output. should be enabled though. 50 #define DEBUG_USE_MESSAGE_BUFFER 1 46 51 47 52 // watchdog trunk/libffado/src/debugmodule/debugmodule.cpp
r864 r1007 24 24 25 25 #include "debugmodule.h" 26 #include "config.h" 26 27 27 28 #include <stdarg.h> … … 32 33 #include <time.h> 33 34 34 #define DO_MESSAGE_BUFFER_PRINT 35 36 #ifndef DO_MESSAGE_BUFFER_PRINT 37 #warning Printing debug info without ringbuffer, not RT-safe! 35 #if DEBUG_USE_MESSAGE_BUFFER 36 #else 37 #ifdef DEBUG 38 #warning Printing debug info without ringbuffer, not RT-safe! 39 #else 40 #error Printing debug info without ringbuffer, not RT-safe (not allowed for non-debug builds)! 41 #endif 38 42 #endif 39 43 … … 389 393 DebugModuleManager::flush() 390 394 { 391 #ifdef D O_MESSAGE_BUFFER_PRINT395 #ifdef DEBUG_USE_MESSAGE_BUFFER 392 396 mb_flush(); 393 397 #else … … 519 523 DebugModuleManager::print(const char *msg) 520 524 { 521 #ifdef D O_MESSAGE_BUFFER_PRINT525 #ifdef DEBUG_USE_MESSAGE_BUFFER 522 526 unsigned int ntries; 523 527 struct timespec wait = {0,50000}; … … 532 536 } 533 537 534 #ifdef D O_MESSAGE_BUFFER_PRINT538 #ifdef DEBUG_USE_MESSAGE_BUFFER 535 539 ntries=1; 536 540 while (ntries) { // try a few times