gallium: s/PIPE_OS_WINDOWS/PIPE_SUBSYSTEM_WINDOWS_USER/ in p_thread.
authorJosé Fonseca <jrfonseca@tungstengraphics.com>
Wed, 27 Aug 2008 21:53:57 +0000 (06:53 +0900)
committerJosé Fonseca <jrfonseca@tungstengraphics.com>
Wed, 27 Aug 2008 21:53:57 +0000 (06:53 +0900)
PIPE_OS_WINDOWS is an umbrella for all Windows variants and subsystems,
PIPE_SUBSYSTEM_WINDOWS_USER is just for user-space windows (e.g., OpenGL),
and the thread primitives currently included in p_thread only support the
later.

src/gallium/include/pipe/p_thread.h

index 9ae7db26ed06ed27966dcd77a147ee225048e39a..b3dfc917816af0bdf8e7d529a609d97a1d776ad7 100644 (file)
@@ -80,7 +80,7 @@ typedef pthread_cond_t pipe_condvar;
   pthread_cond_broadcast(&(cond))
 
 
-#elif defined(PIPE_OS_WINDOWS)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
 
 #include <windows.h>
 
@@ -119,7 +119,6 @@ typedef unsigned pipe_condvar;
 typedef unsigned pipe_thread;
 typedef unsigned pipe_mutex;
 typedef unsigned pipe_condvar;
-typedef unsigned pipe_tsd;
 
 #define pipe_static_mutex(mutex) \
    static pipe_mutex mutex = 0
@@ -166,7 +165,7 @@ typedef unsigned pipe_tsd;
 typedef struct {
 #if defined(PIPE_OS_LINUX)
    pthread_key_t key;
-#elif defined(PIPE_OS_WINDOWS)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
    DWORD key;
 #endif
    int initMagic;
@@ -184,7 +183,7 @@ pipe_tsd_init(pipe_tsd *tsd)
       perror("pthread_key_create(): failed to allocate key for thread specific data");
       exit(-1);
    }
-#elif defined(PIPE_OS_WINDOWS)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
    assert(0);
 #endif
    tsd->initMagic = PIPE_TSD_INIT_MAGIC;
@@ -198,7 +197,7 @@ pipe_tsd_get(pipe_tsd *tsd)
    }
 #if defined(PIPE_OS_LINUX)
    return pthread_getspecific(tsd->key);
-#elif defined(PIPE_OS_WINDOWS)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
    assert(0);
    return NULL;
 #else
@@ -218,7 +217,7 @@ pipe_tsd_set(pipe_tsd *tsd, void *value)
       perror("pthread_set_specific() failed");
       exit(-1);
    }
-#elif defined(PIPE_OS_WINDOWS)
+#elif defined(PIPE_SUBSYSTEM_WINDOWS_USER)
    assert(0);
 #else
    assert(0);