summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/pipelineobj.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2014-03-01 10:21:07 -0700
committerBrian Paul <[email protected]>2014-03-03 13:08:58 -0700
commitd129ea7fa2e57288f64cd247a0ac6d876e1717d2 (patch)
tree599098d707f4b1c506b0e8ac4f614ea2a5d2de4f /src/mesa/main/pipelineobj.c
parent2706db701d6217d245325f90f014233ff40ba18c (diff)
mesa: switch to c11 mutex functions
Reviewed-by: José Fonseca <[email protected]>
Diffstat (limited to 'src/mesa/main/pipelineobj.c')
-rw-r--r--src/mesa/main/pipelineobj.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mesa/main/pipelineobj.c b/src/mesa/main/pipelineobj.c
index 54be4e00418..27012df7273 100644
--- a/src/mesa/main/pipelineobj.c
+++ b/src/mesa/main/pipelineobj.c
@@ -64,7 +64,7 @@ _mesa_delete_pipeline_object(struct gl_context *ctx,
_mesa_reference_shader_program(ctx, &obj->CurrentProgram[i], NULL);
_mesa_reference_shader_program(ctx, &obj->ActiveProgram, NULL);
- _glthread_DESTROY_MUTEX(obj->Mutex);
+ mtx_destroy(&obj->Mutex);
ralloc_free(obj);
}
@@ -77,7 +77,7 @@ _mesa_new_pipeline_object(struct gl_context *ctx, GLuint name)
struct gl_pipeline_object *obj = rzalloc(NULL, struct gl_pipeline_object);
if (obj) {
obj->Name = name;
- _glthread_INIT_MUTEX(obj->Mutex);
+ mtx_init(&obj->Mutex, mtx_plain);
obj->RefCount = 1;
obj->Flags = _mesa_get_shader_flags();
}
@@ -177,11 +177,11 @@ _mesa_reference_pipeline_object_(struct gl_context *ctx,
GLboolean deleteFlag = GL_FALSE;
struct gl_pipeline_object *oldObj = *ptr;
- _glthread_LOCK_MUTEX(oldObj->Mutex);
+ mtx_lock(&oldObj->Mutex);
ASSERT(oldObj->RefCount > 0);
oldObj->RefCount--;
deleteFlag = (oldObj->RefCount == 0);
- _glthread_UNLOCK_MUTEX(oldObj->Mutex);
+ mtx_unlock(&oldObj->Mutex);
if (deleteFlag) {
_mesa_delete_pipeline_object(ctx, oldObj);
@@ -193,7 +193,7 @@ _mesa_reference_pipeline_object_(struct gl_context *ctx,
if (obj) {
/* reference new pipeline object */
- _glthread_LOCK_MUTEX(obj->Mutex);
+ mtx_lock(&obj->Mutex);
if (obj->RefCount == 0) {
/* this pipeline's being deleted (look just above) */
/* Not sure this can ever really happen. Warn if it does. */
@@ -204,7 +204,7 @@ _mesa_reference_pipeline_object_(struct gl_context *ctx,
obj->RefCount++;
*ptr = obj;
}
- _glthread_UNLOCK_MUTEX(obj->Mutex);
+ mtx_unlock(&obj->Mutex);
}
}