diff options
author | Fernando Carrijo <fcarrijo@yahoo.com.br> | 2010-07-13 05:16:01 +0200 |
---|---|---|
committer | Tiago Vignatti <tiago.vignatti@nokia.com> | 2010-07-13 13:36:12 +0300 |
commit | 32b23b00fcc61c51428c4aa027062337336f19e7 (patch) | |
tree | b22a6dc84a6b02f702b05709b6ae62ce86c75664 | |
parent | 8e874f5ec36a7db9f0d92df7fe798f0b1c493b13 (diff) |
mi: inputthread: Fix link error
Macro preprocessing can get confusing sometimes. This patch corrects a link
error by striving for a less elegant albeit simpler solution for the
conditional compilation of XQUARTZ and INPUT_THREAD-related code.
Signed-off-by: Fernando Carrijo <fcarrijo@yahoo.com.br>
Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
-rw-r--r-- | mi/mieq.c | 22 |
1 files changed, 13 insertions, 9 deletions
@@ -83,6 +83,19 @@ static EventQueueRec miEventQueue; #include <pthread.h> static pthread_mutex_t miEventQueueMutex = PTHREAD_MUTEX_INITIALIZER; +static inline void queue_mutex_lock(void) { + pthread_mutex_lock(&miEventQueueMutex); +} + +static inline void queue_mutex_unlock(void) { + pthread_mutex_unlock(&miEventQueueMutex); +} +#else +static inline void queue_mutex_lock(void) {} +static inline void queue_mutex_unlock(void) {} +#endif + +#if defined XQUARTZ extern BOOL serverInitComplete; extern pthread_mutex_t serverInitCompleteMutex; extern pthread_cond_t serverInitCompleteCond; @@ -97,17 +110,8 @@ static inline void wait_for_server_init(void) { } } -static inline void queue_mutex_lock(void) { - pthread_mutex_lock(&miEventQueueMutex); -} - -static inline void queue_mutex_unlock(void) { - pthread_mutex_unlock(&miEventQueueMutex); -} #else static inline void wait_for_server_init(void) {} -static inline void queue_mutex_lock(void) {} -static inline void queue_mutex_unlock(void) {} #endif Bool |