diff options
author | Brian Paul <[email protected]> | 2014-03-01 10:21:07 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2014-03-03 13:08:58 -0700 |
commit | f19000550d8fa4a8a6d8659fdc2a564dcaee7552 (patch) | |
tree | d367c1a2b601838fecfd959ccd58439a938ab017 /src/glsl/builtin_functions.cpp | |
parent | d129ea7fa2e57288f64cd247a0ac6d876e1717d2 (diff) |
glsl: switch to c11 mutex functions
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/glsl/builtin_functions.cpp')
-rw-r--r-- | src/glsl/builtin_functions.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/glsl/builtin_functions.cpp b/src/glsl/builtin_functions.cpp index b9dc95902be..a52077d0634 100644 --- a/src/glsl/builtin_functions.cpp +++ b/src/glsl/builtin_functions.cpp @@ -4351,7 +4351,7 @@ builtin_builder::_memory_barrier(builtin_available_predicate avail) /* The singleton instance of builtin_builder. */ static builtin_builder builtins; -_glthread_DECLARE_STATIC_MUTEX(builtins_lock); +static mtx_t builtins_lock = _MTX_INITIALIZER_NP; /** * External API (exposing the built-in module to the rest of the compiler): @@ -4360,17 +4360,17 @@ _glthread_DECLARE_STATIC_MUTEX(builtins_lock); void _mesa_glsl_initialize_builtin_functions() { - _glthread_LOCK_MUTEX(builtins_lock); + mtx_lock(&builtins_lock); builtins.initialize(); - _glthread_UNLOCK_MUTEX(builtins_lock); + mtx_unlock(&builtins_lock); } void _mesa_glsl_release_builtin_functions() { - _glthread_LOCK_MUTEX(builtins_lock); + mtx_lock(&builtins_lock); builtins.release(); - _glthread_UNLOCK_MUTEX(builtins_lock); + mtx_unlock(&builtins_lock); } ir_function_signature * @@ -4378,9 +4378,9 @@ _mesa_glsl_find_builtin_function(_mesa_glsl_parse_state *state, const char *name, exec_list *actual_parameters) { ir_function_signature * s; - _glthread_LOCK_MUTEX(builtins_lock); + mtx_lock(&builtins_lock); s = builtins.find(state, name, actual_parameters); - _glthread_UNLOCK_MUTEX(builtins_lock); + mtx_unlock(&builtins_lock); return s; } |