projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
mesa: move LONGSTRING into generated enums.c
[mesa.git]
/
src
/
mapi
/
mapi.c
diff --git
a/src/mapi/mapi.c
b/src/mapi/mapi.c
index 6f1b35fa4251fbf744e8e1b4759dcb2e67d99e04..c235adc4ab3018ea441823ca812fa075c278553d 100644
(file)
--- a/
src/mapi/mapi.c
+++ b/
src/mapi/mapi.c
@@
-29,7
+29,6
@@
#include <string.h>
#include "u_current.h"
#include <string.h>
#include "u_current.h"
-#include "u_thread.h"
#include "mapi.h"
#include "stub.h"
#include "table.h"
#include "mapi.h"
#include "stub.h"
#include "table.h"
@@
-72,15
+71,15
@@
get_stub(const char *name, const struct mapi_stub *alias)
void
mapi_init(const char *spec)
{
void
mapi_init(const char *spec)
{
-
u_mutex_declare_static(mutex)
;
+
static mtx_t mutex = _MTX_INITIALIZER_NP
;
const char *p;
int ver, count;
const char *p;
int ver, count;
-
u_mutex_lock(
mutex);
+
mtx_lock(&
mutex);
/* already initialized */
if (mapi_num_stubs) {
/* already initialized */
if (mapi_num_stubs) {
-
u_mutex_unlock(
mutex);
+
mtx_unlock(&
mutex);
return;
}
return;
}
@@
-90,7
+89,7
@@
mapi_init(const char *spec)
/* parse version string */
ver = atoi(p);
if (ver != 1) {
/* parse version string */
ver = atoi(p);
if (ver != 1) {
-
u_mutex_unlock(
mutex);
+
mtx_unlock(&
mutex);
return;
}
p += strlen(p) + 1;
return;
}
p += strlen(p) + 1;
@@
-115,7
+114,7
@@
mapi_init(const char *spec)
mapi_num_stubs = count;
mapi_num_stubs = count;
-
u_mutex_unlock(
mutex);
+
mtx_unlock(&
mutex);
}
/**
}
/**