aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi/mapi.c
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mapi/mapi.c')
-rw-r--r--mesalib/src/mapi/mapi.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/mesalib/src/mapi/mapi.c b/mesalib/src/mapi/mapi.c
index 56f209bfa..aa6b91b42 100644
--- a/mesalib/src/mapi/mapi.c
+++ b/mesalib/src/mapi/mapi.c
@@ -72,15 +72,15 @@ get_stub(const char *name, const struct mapi_stub *alias)
void
mapi_init(const char *spec)
{
- u_mutex_declare_static(mutex);
+ static mtx_t mutex = _MTX_INITIALIZER_NP;
const char *p;
int ver, count;
- u_mutex_lock(mutex);
+ mtx_lock(&mutex);
/* already initialized */
if (mapi_num_stubs) {
- u_mutex_unlock(mutex);
+ mtx_unlock(&mutex);
return;
}
@@ -90,7 +90,7 @@ mapi_init(const char *spec)
/* parse version string */
ver = atoi(p);
if (ver != 1) {
- u_mutex_unlock(mutex);
+ mtx_unlock(&mutex);
return;
}
p += strlen(p) + 1;
@@ -115,7 +115,7 @@ mapi_init(const char *spec)
mapi_num_stubs = count;
- u_mutex_unlock(mutex);
+ mtx_unlock(&mutex);
}
/**
@@ -186,5 +186,5 @@ mapi_table_fill(struct mapi_table *tbl, const mapi_proc *procs)
void
mapi_table_make_current(const struct mapi_table *tbl)
{
- u_current_set(tbl);
+ u_current_set_table(tbl);
}