aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xwin/InitOutput.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-07-25 08:32:37 +0200
committermarha <marha@users.sourceforge.net>2013-07-25 08:32:37 +0200
commitacf3535c75d7c79154b6b89c66567317944d244c (patch)
tree8fcc57fc152d9c594e3119678a6f5d8f0160267b /xorg-server/hw/xwin/InitOutput.c
parent5c340ceb9356ea029dea53b73440268d4769d5a5 (diff)
downloadvcxsrv-acf3535c75d7c79154b6b89c66567317944d244c.tar.gz
vcxsrv-acf3535c75d7c79154b6b89c66567317944d244c.tar.bz2
vcxsrv-acf3535c75d7c79154b6b89c66567317944d244c.zip
xserver mesa git update 25 Jul 2013
xserver commit 43ac0491e36cdbb716b5c9d39c97d0aba3bebd75 mesa commit 8a9df7a370b66ec50b6255e4d66ac1ed331319fb
Diffstat (limited to 'xorg-server/hw/xwin/InitOutput.c')
-rw-r--r--xorg-server/hw/xwin/InitOutput.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/xorg-server/hw/xwin/InitOutput.c b/xorg-server/hw/xwin/InitOutput.c
index 04c17b702..d6b5e4fd9 100644
--- a/xorg-server/hw/xwin/InitOutput.c
+++ b/xorg-server/hw/xwin/InitOutput.c
@@ -186,6 +186,25 @@ ddxBeforeReset(void)
}
#endif
+int
+main(int argc, char *argv[], char *envp[])
+{
+ int iReturn;
+
+ /* Create & acquire the termination mutex */
+ iReturn = pthread_mutex_init(&g_pmTerminating, NULL);
+ if (iReturn != 0) {
+ ErrorF("ddxMain - pthread_mutex_init () failed: %d\n", iReturn);
+ }
+
+ iReturn = pthread_mutex_lock(&g_pmTerminating);
+ if (iReturn != 0) {
+ ErrorF("ddxMain - pthread_mutex_lock () failed: %d\n", iReturn);
+ }
+
+ return dix_main(argc, argv, envp);
+}
+
/* See Porting Layer Definition - p. 57 */
void
ddxGiveUp(enum ExitCode error)
@@ -243,6 +262,19 @@ ddxGiveUp(enum ExitCode error)
/* Tell Windows that we want to end the app */
PostQuitMessage(0);
+
+ {
+ winDebug("ddxGiveUp - Releasing termination mutex\n");
+
+ int iReturn = pthread_mutex_unlock(&g_pmTerminating);
+
+ if (iReturn != 0) {
+ ErrorF("winMsgWindowProc - pthread_mutex_unlock () failed: %d\n",
+ iReturn);
+ }
+ }
+
+ winDebug("ddxGiveUp - End\n");
}
/* See Porting Layer Definition - p. 57 */
@@ -962,6 +994,10 @@ InitOutput(ScreenInfo * pScreenInfo, int argc, char *argv[])
/* Store the instance handle */
g_hInstance = GetModuleHandle(NULL);
+ /* Create the messaging window */
+ if (serverGeneration == 1)
+ winCreateMsgWindowThread();
+
/* Initialize each screen */
for (i = 0; i < g_iNumScreens; ++i) {
/* Initialize the screen */