summaryrefslogtreecommitdiff
path: root/src/mapi/mapi/u_thread.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-05-07 07:31:44 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-05-07 07:31:44 +0100
commit5065d3327617977c93e5ced5eefafc8f62310012 (patch)
treebaf4b87fd590c28f810845701920257352722347 /src/mapi/mapi/u_thread.h
parent5569faf05abd550b81649f3961c743448e708825 (diff)
mapi/glapi: Don't allocate a page for every function on windows.
Diffstat (limited to 'src/mapi/mapi/u_thread.h')
-rw-r--r--src/mapi/mapi/u_thread.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mapi/mapi/u_thread.h b/src/mapi/mapi/u_thread.h
index 992dbaace9..b4487a3400 100644
--- a/src/mapi/mapi/u_thread.h
+++ b/src/mapi/mapi/u_thread.h
@@ -95,8 +95,9 @@ struct u_tsd {
typedef CRITICAL_SECTION u_mutex;
+/* http://locklessinc.com/articles/pthreads_on_windows/ */
#define u_mutex_declare_static(name) \
- /* static */ u_mutex name = { 0, 0, 0, 0, 0, 0 }
+ /* static */ u_mutex name = {(void*)-1, -1, 0, 0, 0, 0}
#define u_mutex_init(name) InitializeCriticalSection(&name)
#define u_mutex_destroy(name) DeleteCriticalSection(&name)