diff options
author | Brian Paul <[email protected]> | 2006-06-16 14:50:05 +0000 |
---|---|---|
committer | Brian Paul <[email protected]> | 2006-06-16 14:50:05 +0000 |
commit | 385f23edf91a366b2e81449632ba3862957a2a74 (patch) | |
tree | 61378612bdd021ecface03f6cd84ac75be5c32e2 /src/mesa/glapi/glthread.h | |
parent | c0168fabed24e9089b47895475c7030925cbf399 (diff) |
Thread safety for Win32. SourceForge bug #1507315.
Diffstat (limited to 'src/mesa/glapi/glthread.h')
-rw-r--r-- | src/mesa/glapi/glthread.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/mesa/glapi/glthread.h b/src/mesa/glapi/glthread.h index 53592aab32e..0958cd1b32c 100644 --- a/src/mesa/glapi/glthread.h +++ b/src/mesa/glapi/glthread.h @@ -1,8 +1,8 @@ /* * Mesa 3-D graphics library - * Version: 6.3 + * Version: 6.5.1 * - * Copyright (C) 1999-2003 Brian Paul All Rights Reserved. + * Copyright (C) 1999-2006 Brian Paul All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -163,12 +163,11 @@ typedef HANDLE _glthread_Thread; typedef CRITICAL_SECTION _glthread_Mutex; -/* XXX need to really implement mutex-related macros */ -#define _glthread_DECLARE_STATIC_MUTEX(name) static _glthread_Mutex name = 0 -#define _glthread_INIT_MUTEX(name) (void) name -#define _glthread_DESTROY_MUTEX(name) (void) name -#define _glthread_LOCK_MUTEX(name) (void) name -#define _glthread_UNLOCK_MUTEX(name) (void) name +#define _glthread_DECLARE_STATIC_MUTEX(name) /*static*/ _glthread_Mutex name = {0,0,0,0,0,0} +#define _glthread_INIT_MUTEX(name) InitializeCriticalSection(&name) +#define _glthread_DESTROY_MUTEX(name) DeleteCriticalSection(&name) +#define _glthread_LOCK_MUTEX(name) EnterCriticalSection(&name) +#define _glthread_UNLOCK_MUTEX(name) LeaveCriticalSection(&name) #endif /* WIN32_THREADS */ |