aboutsummaryrefslogtreecommitdiffstats
path: root/src/mapi/stub.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-03-05 16:06:00 -0700
committerBrian Paul <[email protected]>2014-03-06 07:53:06 -0700
commit84094a273e3ceeead5b6c86d3d8244374ea6fb1c (patch)
tree8cb0771255a1074c9d903dcfd8ddb3334b78b106 /src/mapi/stub.c
parent846a7e86309ab3877af6b7d3a63880468dfacbd3 (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/stub.c')
-rw-r--r--src/mapi/stub.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mapi/stub.c b/src/mapi/stub.c
index acd2c0a79b1..dfadbe1a5d3 100644
--- a/src/mapi/stub.c
+++ b/src/mapi/stub.c
@@ -126,11 +126,11 @@ stub_add_dynamic(const char *name)
struct mapi_stub *
stub_find_dynamic(const char *name, int generate)
{
- u_mutex_declare_static(dynamic_mutex);
+ static mtx_t dynamic_mutex = _MTX_INITIALIZER_NP;
struct mapi_stub *stub = NULL;
int count, i;
- u_mutex_lock(dynamic_mutex);
+ mtx_lock(&dynamic_mutex);
if (generate)
assert(!stub_find_public(name));
@@ -147,7 +147,7 @@ stub_find_dynamic(const char *name, int generate)
if (generate && !stub)
stub = stub_add_dynamic(name);
- u_mutex_unlock(dynamic_mutex);
+ mtx_unlock(&dynamic_mutex);
return stub;
}