diff options
Diffstat (limited to 'dix/main.c')
-rw-r--r-- | dix/main.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/dix/main.c b/dix/main.c index ee2e10db5..0527621e7 100644 --- a/dix/main.c +++ b/dix/main.c @@ -234,6 +234,12 @@ static int indexForScanlinePad[ 65 ] = { #endif #ifdef XQUARTZ +#include <pthread.h> + +BOOL serverInitComplete = FALSE; +pthread_mutex_t serverInitCompleteMutex = PTHREAD_MUTEX_INITIALIZER; +pthread_cond_t serverInitCompleteCond = PTHREAD_COND_INITIALIZER; + int dix_main(int argc, char *argv[], char *envp[]) #else int main(int argc, char *argv[], char *envp[]) @@ -378,6 +384,14 @@ 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); +#endif + NotifyParentProcess(); Dispatch(); |