glapi: remove u_mutex wrapper code, use c99 thread mutexes directly
[mesa.git] / src / mapi / u_execmem.c
index 3573652635ff4896ab9ea5442066dcbd7b800ba7..ac1cae093d73da0a71ecff8b20cf3f82efd42187 100644 (file)
@@ -39,7 +39,7 @@
 
 #define EXEC_MAP_SIZE (4*1024)
 
-u_mutex_declare_static(exec_mutex);
+static mtx_t exec_mutex = _MTX_INITIALIZER_NP;
 
 static unsigned int head = 0;
 
@@ -123,7 +123,7 @@ u_execmem_alloc(unsigned int size)
 {
    void *addr = NULL;
 
-   u_mutex_lock(exec_mutex);
+   mtx_lock(&exec_mutex);
 
    if (!init_map())
       goto bail;
@@ -137,7 +137,7 @@ u_execmem_alloc(unsigned int size)
    head += size;
 
 bail:
-   u_mutex_unlock(exec_mutex);
+   mtx_unlock(&exec_mutex);
 
    return addr;
 }