diff options
author | marha <marha@users.sourceforge.net> | 2011-05-23 12:30:27 +0000 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2011-05-23 12:30:27 +0000 |
commit | ae87f2594b9439cb63a6b52e42e09504b687aea3 (patch) | |
tree | a0a59232ccde314cb2032d2856f1eb3b8701d3f8 /xorg-server/dix/main.c | |
parent | 52011cfedaa930d61d8f60b283a2051093727582 (diff) | |
download | vcxsrv-ae87f2594b9439cb63a6b52e42e09504b687aea3.tar.gz vcxsrv-ae87f2594b9439cb63a6b52e42e09504b687aea3.tar.bz2 vcxsrv-ae87f2594b9439cb63a6b52e42e09504b687aea3.zip |
xserver git update 23 May 2011
Diffstat (limited to 'xorg-server/dix/main.c')
-rw-r--r-- | xorg-server/dix/main.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/xorg-server/dix/main.c b/xorg-server/dix/main.c index 31e2d48c4..bc958b896 100644 --- a/xorg-server/dix/main.c +++ b/xorg-server/dix/main.c @@ -121,9 +121,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[]); @@ -277,18 +277,25 @@ 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(); 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) |