diff options
author | Brian Paul <[email protected]> | 2014-03-05 16:06:00 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-03-06 07:53:06 -0700 |
commit | 84094a273e3ceeead5b6c86d3d8244374ea6fb1c (patch) | |
tree | 8cb0771255a1074c9d903dcfd8ddb3334b78b106 /src/mapi/u_current.c | |
parent | 846a7e86309ab3877af6b7d3a63880468dfacbd3 (diff) |
glapi: remove u_mutex wrapper code, use c99 thread mutexes directly
v2: fix initializer mistake spotted by Chia-I Wu.
Reviewed-by: Chia-I Wu <[email protected]>
Diffstat (limited to 'src/mapi/u_current.c')
-rw-r--r-- | src/mapi/u_current.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mapi/u_current.c b/src/mapi/u_current.c index 76dae91c367..afa887e0692 100644 --- a/src/mapi/u_current.c +++ b/src/mapi/u_current.c @@ -144,7 +144,7 @@ u_current_init_tsd(void) /** * Mutex for multithread check. */ -u_mutex_declare_static(ThreadCheckMutex); +static mtx_t ThreadCheckMutex = _MTX_INITIALIZER_NP; /** * We should call this periodically from a function such as glXMakeCurrent @@ -159,7 +159,7 @@ u_current_init(void) if (ThreadSafe) return; - u_mutex_lock(ThreadCheckMutex); + mtx_lock(&ThreadCheckMutex); if (firstCall) { u_current_init_tsd(); @@ -171,7 +171,7 @@ u_current_init(void) u_current_set_table(NULL); u_current_set_context(NULL); } - u_mutex_unlock(ThreadCheckMutex); + mtx_unlock(&ThreadCheckMutex); } #else |