diff options
author | Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> | 2008-04-07 07:56:41 +0930 |
---|---|---|
committer | Peter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au> | 2008-04-07 07:56:41 +0930 |
commit | fd06e8f8c1d82a9d91931e8532bee0fd9c9ca9ab (patch) | |
tree | fda1a9d90f4a3e99af9da656939ff8c112cfeb33 /dix/main.c | |
parent | b46a00918691cbd5ca80b6d3acae7614f93e073b (diff) | |
parent | 6c0cfe3d43b177c4cfaf7e228f32c655f9a98459 (diff) |
Merge branch 'master' into dcdc_rework
Conflicts:
Xext/xevie.c
dix/dispatch.c
Diffstat (limited to 'dix/main.c')
-rw-r--r-- | dix/main.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/dix/main.c b/dix/main.c index d229c192e..6a94aaa35 100644 --- a/dix/main.c +++ b/dix/main.c @@ -93,6 +93,7 @@ Equipment Corporation. #include "colormap.h" #include "colormapst.h" #include "cursorstr.h" +#include "selection.h" #include <X11/fonts/font.h> #include "opaque.h" #include "servermd.h" @@ -112,6 +113,9 @@ Equipment Corporation. #include "dispatch.h" /* InitProcVectors() */ #endif +#include <pthread.h> +pthread_key_t threadname_key=0; + #ifdef DPMSExtension #define DPMS_SERVER #include <X11/extensions/dpms.h> @@ -247,6 +251,17 @@ main(int argc, char *argv[], char *envp[]) char *xauthfile; HWEventQueueType alwaysCheckForInput[2]; + if(threadname_key == 0) ErrorF("pthread_key_create returned %d\n", pthread_key_create(&threadname_key, NULL)); + ErrorF("threadname_key = %d\n", threadname_key); + if(pthread_getspecific(threadname_key) == NULL) { + char *nameptr = malloc(32); + sprintf(nameptr, "main thread %d", random()); + // strcpy(nameptr, "main thread"); + ErrorF("calling: pthread_setspecific(%d, %s)=%d\n", threadname_key, nameptr, pthread_setspecific(threadname_key, nameptr)); + if (pthread_getspecific(threadname_key) != NULL) ErrorF("current thread: %s\n", (char *)pthread_getspecific(threadname_key)); + } else { + if (pthread_getspecific(threadname_key) != NULL) ErrorF("thread was already: %s\n", (char *)pthread_getspecific(threadname_key)); + } display = "0"; InitGlobals(); @@ -346,6 +361,7 @@ main(int argc, char *argv[], char *envp[]) InitAtoms(); InitEvents(); + InitSelections(); InitGlyphCaching(); if (!dixResetPrivates()) FatalError("couldn't init private data storage"); |