comparison src/xmms-sid.h @ 293:3fa910269508

Remove extra semicolon from macro definition, #undef DEBUG
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 25 Dec 2004 18:18:03 +0000
parents 69ec4290030c
children d5c79d5a0b60
comparison
equal deleted inserted replaced
292:5a50071cca9d 293:3fa910269508
42 42
43 /* 43 /*
44 * Some constants and defines 44 * Some constants and defines
45 */ 45 */
46 /* Define for spurious debugging messages */ 46 /* Define for spurious debugging messages */
47 #define DEBUG 47 #undef DEBUG
48 48
49 /* Define to enable non-portable thread and mutex debugging code. 49 /* Define to enable non-portable thread and mutex debugging code.
50 * (Works probably with Linux glibc only) 50 * (Works probably with Linux glibc only)
51 */ 51 */
52 #undef XS_MUTEX_DEBUG 52 #undef XS_MUTEX_DEBUG
91 * easily change from pthreads to glib threads, etc, if necessary. 91 * easily change from pthreads to glib threads, etc, if necessary.
92 */ 92 */
93 #define XS_MPP(M) M ## _mutex 93 #define XS_MPP(M) M ## _mutex
94 #if XS_MUTEX_DEBUG 94 #if XS_MUTEX_DEBUG
95 #define XS_MUTEX(M) pthread_mutex_t XS_MPP(M) = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; int M ## _qq; 95 #define XS_MUTEX(M) pthread_mutex_t XS_MPP(M) = PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP; int M ## _qq;
96 #define XS_MUTEX_H(M) extern pthread_mutex_t XS_MPP(M); extern int M ## _qq; 96 #define XS_MUTEX_H(M) extern pthread_mutex_t XS_MPP(M); extern int M ## _qq
97 #define XS_MUTEX_LOCK(M) { M ## _qq = pthread_mutex_lock(&XS_MPP(M)); if (M ## _qq) XSDEBUG("XS_MUTEX_LOCK(" #M ") == %i\n", M ## _qq); } 97 #define XS_MUTEX_LOCK(M) { M ## _qq = pthread_mutex_lock(&XS_MPP(M)); if (M ## _qq) XSDEBUG("XS_MUTEX_LOCK(" #M ") == %i\n", M ## _qq); }
98 #define XS_MUTEX_UNLOCK(M) { M ## _qq = pthread_mutex_unlock(&XS_MPP(M)); if (M ## _qq) XSDEBUG("XS_MUTEX_UNLOCK(" #M ") == %i\n", M ## _qq); } 98 #define XS_MUTEX_UNLOCK(M) { M ## _qq = pthread_mutex_unlock(&XS_MPP(M)); if (M ## _qq) XSDEBUG("XS_MUTEX_UNLOCK(" #M ") == %i\n", M ## _qq); }
99 #else 99 #else
100 #define XS_MUTEX(M) pthread_mutex_t XS_MPP(M) = PTHREAD_MUTEX_INITIALIZER 100 #define XS_MUTEX(M) pthread_mutex_t XS_MPP(M) = PTHREAD_MUTEX_INITIALIZER
101 #define XS_MUTEX_H(M) extern pthread_mutex_t XS_MPP(M); 101 #define XS_MUTEX_H(M) extern pthread_mutex_t XS_MPP(M)
102 #define XS_MUTEX_LOCK(M) pthread_mutex_lock(&XS_MPP(M)) 102 #define XS_MUTEX_LOCK(M) pthread_mutex_lock(&XS_MPP(M))
103 #define XS_MUTEX_UNLOCK(M) pthread_mutex_unlock(&XS_MPP(M)) 103 #define XS_MUTEX_UNLOCK(M) pthread_mutex_unlock(&XS_MPP(M))
104 #endif 104 #endif
105 105
106 /* Shorthands for linked lists 106 /* Shorthands for linked lists