#include "GL/internal/glcore.h"
#include "glapitable.h"
#include "glxextensions.h"
-#if defined( XTHREADS )
+#if defined( USE_XTHREADS )
# include <X11/Xthreads.h>
#elif defined( PTHREADS )
# include <pthread.h>
extern int __glXDebug;
/* This is per-thread storage in an MT environment */
-#if defined( XTHREADS ) || defined( PTHREADS )
+#if defined( USE_XTHREADS ) || defined( PTHREADS )
extern void __glXSetCurrentContext(__GLXcontext *c);
#define __glXGetCurrentContext() __glXcurrentContext
#define __glXSetCurrentContext(gc) __glXcurrentContext = gc
-#endif /* defined( XTHREADS ) || defined( PTHREADS ) */
+#endif /* defined( USE_XTHREADS ) || defined( PTHREADS ) */
/*
** Global lock for all threads in this address space using the GLX
** extension
*/
-#if defined( XTHREADS )
+#if defined( USE_XTHREADS )
extern xmutex_rec __glXmutex;
#define __glXLock() xmutex_lock(&__glXmutex)
#define __glXUnlock() xmutex_unlock(&__glXmutex)
* Current context management and locking
*/
-#if defined( XTHREADS )
+#if defined( USE_XTHREADS )
/* thread safe */
static GLboolean TSDinitialized = GL_FALSE;
XEDataObject dataObj;
int major, minor;
-#if defined(XTHREADS)
+#if defined(USE_XTHREADS)
{
static int firstCall = 1;
if (firstCall) {
print '# define HIDDEN(x)'
print '#endif'
print ''
- print '#if defined(PTHREADS) || defined(XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
+ print '#if defined(PTHREADS) || defined(USE_XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
print '# define THREADS'
print '#endif'
print ''
print '#define GLOBL_FN(x) GLOBL x'
print '#endif'
print ''
- print '#if defined(PTHREADS) || defined(XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
+ print '#if defined(PTHREADS) || defined(USE_XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
print '# define THREADS'
print '#endif'
print ''
* XFree86 has its own thread wrapper, Xthreads.h
* We wrap it again for GL.
*/
-#ifdef XTHREADS
+#ifdef USE_XTHREADS
unsigned long
_glthread_GetID(void)
#if (defined(PTHREADS) || defined(SOLARIS_THREADS) ||\
- defined(WIN32_THREADS) || defined(XTHREADS) || defined(BEOS_THREADS)) \
+ defined(WIN32_THREADS) || defined(USE_XTHREADS) || defined(BEOS_THREADS)) \
&& !defined(THREADS)
# define THREADS
#endif
* XFree86 has its own thread wrapper, Xthreads.h
* We wrap it again for GL.
*/
-#ifdef XTHREADS
+#ifdef USE_XTHREADS
#include <X11/Xthreads.h>
typedef struct {
#define _glthread_UNLOCK_MUTEX(name) \
(void) xmutex_unlock(&(name))
-#endif /* XTHREADS */
+#endif /* USE_XTHREADS */
# define HIDDEN(x)
#endif
-#if defined(PTHREADS) || defined(XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
+#if defined(PTHREADS) || defined(USE_XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
# define THREADS
#endif
#define GLOBL_FN(x) GLOBL x
#endif
-#if defined(PTHREADS) || defined(XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
+#if defined(PTHREADS) || defined(USE_XTHREADS) || defined(SOLARIS_THREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
# define THREADS
#endif