aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/dix/main.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-05-23 12:38:03 +0000
committermarha <marha@users.sourceforge.net>2011-05-23 12:38:03 +0000
commit98a78a31883c4b5d63dd1465b4208bcc7c12bfcb (patch)
treefdb125ad89bd8b0fae5c3580558989367f666f2b /xorg-server/dix/main.c
parent215417a52a66f9a2252c64f24e417297eba2331f (diff)
parentae87f2594b9439cb63a6b52e42e09504b687aea3 (diff)
downloadvcxsrv-98a78a31883c4b5d63dd1465b4208bcc7c12bfcb.tar.gz
vcxsrv-98a78a31883c4b5d63dd1465b4208bcc7c12bfcb.tar.bz2
vcxsrv-98a78a31883c4b5d63dd1465b4208bcc7c12bfcb.zip
merge ^/branches/released .
Diffstat (limited to 'xorg-server/dix/main.c')
-rw-r--r--xorg-server/dix/main.c25
1 files changed, 16 insertions, 9 deletions
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c
index 0be753742..542f2607a 100644
--- a/xorg-server/dix/main.c
+++ b/xorg-server/dix/main.c
@@ -125,9 +125,9 @@ extern void Dispatch(void);
#ifdef XQUARTZ
#include <pthread.h>
-BOOL serverInitComplete = FALSE;
-pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER;
+BOOL serverRunning = FALSE;
+pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER;
+pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER;
int dix_main(int argc, char *argv[], char *envp[]);
@@ -321,11 +321,11 @@ int main(int argc, char *argv[], char *envp[])
}
#ifdef XQUARTZ
- /* Let the other threads know the server is done with its init */
- pthread_mutex_lock(&serverInitCompleteMutex);
- serverInitComplete = TRUE;
- pthread_cond_broadcast(&serverInitCompleteCond);
- pthread_mutex_unlock(&serverInitCompleteMutex);
+ /* Let the other threads know the server is done with its init */
+ pthread_mutex_lock(&serverRunningMutex);
+ serverRunning = TRUE;
+ pthread_cond_broadcast(&serverRunningCond);
+ pthread_mutex_unlock(&serverRunningMutex);
#endif
NotifyParentProcess();
@@ -337,7 +337,14 @@ int main(int argc, char *argv[], char *envp[])
Dispatch();
- UndisplayDevices();
+#ifdef XQUARTZ
+ /* Let the other threads know the server is no longer running */
+ pthread_mutex_lock(&serverRunningMutex);
+ serverRunning = FALSE;
+ pthread_mutex_unlock(&serverRunningMutex);
+#endif
+
+ UndisplayDevices();
/* Now free up whatever must be freed */
if (screenIsSaved == SCREEN_SAVER_ON)