summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorJeremy Huddleston <jeremyhu@apple.com>2011-05-14 16:11:32 -0700
committerJeremy Huddleston <jeremyhu@apple.com>2011-05-14 19:15:27 -0700
commit25191648b8db87735a99243697f73036255c1eb6 (patch)
tree90aa0541b2595f15beb96fabf9a3a970b726ec18 /mi
parentfd5f630bc41de73be3b1d26bf9ce3e9ef1badc3b (diff)
XQuartz: Don't call mieqEnqueue during server shutdown
Found-by: GuardMalloc Signed-off-by: Jeremy Huddleston <jeremyhu@apple.com>
Diffstat (limited to 'mi')
-rw-r--r--mi/mieq.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/mi/mieq.c b/mi/mieq.c
index 236ffcc3b..031b11ab2 100644
--- a/mi/mieq.c
+++ b/mi/mieq.c
@@ -83,17 +83,17 @@ static EventQueueRec miEventQueue;
#include <pthread.h>
static pthread_mutex_t miEventQueueMutex = PTHREAD_MUTEX_INITIALIZER;
-extern BOOL serverInitComplete;
-extern pthread_mutex_t serverInitCompleteMutex;
-extern pthread_cond_t serverInitCompleteCond;
+extern BOOL serverRunning;
+extern pthread_mutex_t serverRunningMutex;
+extern pthread_cond_t serverRunningCond;
static inline void wait_for_server_init(void) {
/* If the server hasn't finished initializing, wait for it... */
- if(!serverInitComplete) {
- pthread_mutex_lock(&serverInitCompleteMutex);
- while(!serverInitComplete)
- pthread_cond_wait(&serverInitCompleteCond, &serverInitCompleteMutex);
- pthread_mutex_unlock(&serverInitCompleteMutex);
+ if(!serverRunning) {
+ pthread_mutex_lock(&serverRunningMutex);
+ while(!serverRunning)
+ pthread_cond_wait(&serverRunningCond, &serverRunningMutex);
+ pthread_mutex_unlock(&serverRunningMutex);
}
}
#endif