env.AppendUnique(CPPDEFINES = [
'_GDI32_', # prevent wgl* being declared __declspec(dllimport)
'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
- 'WIN32_THREADS', # use Win32 thread API
'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
])
#include "stw_framebuffer.h"
#include "stw_st.h"
-#ifdef WIN32_THREADS
extern _glthread_Mutex OneTimeLock;
-#endif
struct stw_device *stw_dev = NULL;
stw_dev->stw_winsys = stw_winsys;
-#ifdef WIN32_THREADS
_glthread_INIT_MUTEX(OneTimeLock);
-#endif
stw_dev->stapi = stw_st_create_api();
stw_dev->smapi = CALLOC_STRUCT(st_manager);
stw_dev->screen->destroy(stw_dev->screen);
-#ifdef WIN32_THREADS
_glthread_DESTROY_MUTEX(OneTimeLock);
_glapi_destroy_multithread();
-#endif
#ifdef DEBUG
debug_memory_end(stw_dev->memdbg_no);
env.Append(CPPDEFINES = [
'_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
- 'WIN32_THREADS', # use Win32 thread API
])
env.Append(CPPPATH = [
print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))'
print '# endif'
print ''
- print '#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
+ print '#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)'
print '# define THREADS'
print '#endif'
print ''
print '#define GLOBL_FN(x) GLOBL x'
print '#endif'
print ''
- print '#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)'
+ print '#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)'
print '# define THREADS'
print '#endif'
print ''
# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))
# endif
-#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
+#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)
# define THREADS
#endif
#define GLOBL_FN(x) GLOBL x
#endif
-#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
+#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)
# define THREADS
#endif
void
u_current_destroy(void)
{
-#if defined(THREADS) && defined(WIN32_THREADS)
+#if defined(THREADS) && defined(WIN32)
u_tsd_destroy(&u_current_table_tsd);
u_tsd_destroy(&u_current_user_tsd);
#endif
/**
* Mutex for multithread check.
*/
-#ifdef WIN32_THREADS
+#ifdef WIN32
/* _glthread_DECLARE_STATIC_MUTEX is broken on windows. There will be race! */
#define CHECK_MULTITHREAD_LOCK()
#define CHECK_MULTITHREAD_UNLOCK()
* Be sure that you compile using the Multithreaded runtime, otherwise
* bad things will happen.
*/
-#ifdef WIN32_THREADS
+#ifdef WIN32
static void InsteadOf_exit(int nCode)
{
}
}
-#endif /* WIN32_THREADS */
+#endif /* WIN32 */
/*
* BeOS threads
#include "u_compiler.h"
-#if defined(PTHREADS) || defined(WIN32_THREADS) || defined(BEOS_THREADS)
+#if defined(PTHREADS) || defined(WIN32) || defined(BEOS_THREADS)
#ifndef THREADS
#define THREADS
#endif
* IMPORTANT: Link with multithreaded runtime library when THREADS are
* used!
*/
-#ifdef WIN32_THREADS
+#ifdef WIN32
#include <windows.h>
struct u_tsd {
#define u_mutex_lock(name) EnterCriticalSection(&name)
#define u_mutex_unlock(name) LeaveCriticalSection(&name)
-#endif /* WIN32_THREADS */
+#endif /* WIN32 */
/*
env.Append(CPPDEFINES = [
'_GDI32_', # prevent gl* being declared __declspec(dllimport) in MS headers
'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
- 'WIN32_THREADS', # use Win32 thread API
])
env.Prepend(CPPPATH = ['#src/talloc'])
else:
#include "glapi.h"
#include "glThread.h"
-#ifdef WIN32_THREADS
+#ifdef WIN32
+
extern "C" _glthread_Mutex OneTimeLock;
extern "C" _glthread_Mutex GenTexturesLock;
_CriticalSectionInit _CriticalSectionInit::m_inst;
-#endif
+#endif /* WIN32 */