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_execmem.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_execmem.c')
-rw-r--r-- | src/mapi/u_execmem.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mapi/u_execmem.c b/src/mapi/u_execmem.c index 3573652635f..ac1cae093d7 100644 --- a/src/mapi/u_execmem.c +++ b/src/mapi/u_execmem.c @@ -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; } |