Changeset 822 for soft/giet_vm/applications/rosenfeld/include/mca.h
- Timestamp:
- Jun 1, 2016, 10:25:43 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
soft/giet_vm/applications/rosenfeld/include/mca.h
r821 r822 26 26 27 27 28 // QM : using mutex lock instead of mutexlock,29 // because apparently mutexlocks cause a bug in valgrind28 // QM : using mutex lock instead of spinlock, 29 // because apparently spinlocks cause a bug in valgrind 30 30 // (solved but the installed version is not recent enough) 31 31 // cf. https://bugs.kde.org/show_bug.cgi?id=336435 32 32 pthread_mutex_t print_lock; 33 33 34 #define MCA_VERBOSE0(X) ({ \ 34 35 36 37 #if MCA_VERBOSE_LEVEL >= 1 38 #define MCA_VERBOSE1(X) ({ \ 35 39 pthread_mutex_lock(&print_lock); \ 36 40 X; \ 37 41 pthread_mutex_unlock(&print_lock); \ 38 42 }) 39 #define MCA_VERBOSE1(X) ({ \ 43 #else 44 #define MCA_VERBOSE1(X) 45 #endif 46 47 #if MCA_VERBOSE_LEVEL >= 2 48 #define MCA_VERBOSE2(X) ({ \ 40 49 pthread_mutex_lock(&print_lock); \ 41 50 X; \ 42 51 pthread_mutex_unlock(&print_lock); \ 43 52 }) 44 #define MCA_DISPLAY0(X) ({ \ 53 #else 54 #define MCA_VERBOSE2(X) 55 #endif 56 57 #if MCA_VERBOSE_LEVEL >= 3 58 #define MCA_VERBOSE3(X) ({ \ 45 59 pthread_mutex_lock(&print_lock); \ 46 60 X; \ 47 61 pthread_mutex_unlock(&print_lock); \ 48 62 }) 49 #define MCA_DISPLAY1(X) ({ \ 50 pthread_mutex_lock(&print_lock); \ 51 X; \ 52 pthread_mutex_unlock(&print_lock); \ 53 }) 54 55 56 #define MCA_VERBOSE2(X) 57 /* 58 #define MCA_VERBOSE2(X) ({ \ 59 pthread_mutex_lock(&print_lock); \ 60 X; \ 61 pthread_mutex_unlock(&print_lock); \ 62 }) 63 */ 64 65 #define MCA_DISPLAY2(X) 66 63 #else 64 #define MCA_VERBOSE3(X) 65 #endif 67 66 68 67
Note: See TracChangeset
for help on using the changeset viewer.