/* 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):
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 *
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;
}