aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/nine/nine_state.c
diff options
context:
space:
mode:
authorTimothy Arceri <[email protected]>2017-03-05 12:12:30 +1100
committerTimothy Arceri <[email protected]>2017-03-07 08:52:38 +1100
commitba72554f3e576c1674d52ab16d8d2edff9398b71 (patch)
tree317c80f33ea1edcf238d3545ff1a6104a7d55fc8 /src/gallium/state_trackers/nine/nine_state.c
parentbe188289e1bf0e259c91a751c405d54bb99bc5d4 (diff)
gallium/util: replace pipe_mutex_lock() with mtx_lock()
replace pipe_mutex_lock() was made unnecessary with fd33a6bcd7f12. Replaced using: find ./src -type f -exec sed -i -- \ 's:pipe_mutex_lock(\([^)]*\)):mtx_lock(\&\1):g' {} \; Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/nine/nine_state.c')
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 978fa013c49..2f654141d33 100644
--- a/src/gallium/state_trackers/nine/nine_state.c
+++ b/src/gallium/state_trackers/nine/nine_state.c
@@ -79,7 +79,7 @@ struct csmt_context {
static void
nine_csmt_wait_processed(struct csmt_context *ctx)
{
- pipe_mutex_lock(ctx->mutex_processed);
+ mtx_lock(&ctx->mutex_processed);
while (!p_atomic_read(&ctx->processed)) {
cnd_wait(&ctx->event_processed, &ctx->mutex_processed);
}
@@ -98,7 +98,7 @@ PIPE_THREAD_ROUTINE(nine_csmt_worker, arg)
while (1) {
nine_queue_wait_flush(ctx->pool);
- pipe_mutex_lock(ctx->thread_running);
+ mtx_lock(&ctx->thread_running);
/* Get instruction. NULL on empty cmdbuf. */
while (!p_atomic_read(&ctx->terminate) &&
@@ -106,7 +106,7 @@ PIPE_THREAD_ROUTINE(nine_csmt_worker, arg)
/* decode */
if (instr->func(ctx->device, instr)) {
- pipe_mutex_lock(ctx->mutex_processed);
+ mtx_lock(&ctx->mutex_processed);
p_atomic_set(&ctx->processed, TRUE);
cnd_signal(&ctx->event_processed);
pipe_mutex_unlock(ctx->mutex_processed);
@@ -114,15 +114,15 @@ PIPE_THREAD_ROUTINE(nine_csmt_worker, arg)
if (p_atomic_read(&ctx->toPause)) {
pipe_mutex_unlock(ctx->thread_running);
/* will wait here the thread can be resumed */
- pipe_mutex_lock(ctx->thread_resume);
- pipe_mutex_lock(ctx->thread_running);
+ mtx_lock(&ctx->thread_resume);
+ mtx_lock(&ctx->thread_running);
pipe_mutex_unlock(ctx->thread_resume);
}
}
pipe_mutex_unlock(ctx->thread_running);
if (p_atomic_read(&ctx->terminate)) {
- pipe_mutex_lock(ctx->mutex_processed);
+ mtx_lock(&ctx->mutex_processed);
p_atomic_set(&ctx->processed, TRUE);
cnd_signal(&ctx->event_processed);
pipe_mutex_unlock(ctx->mutex_processed);
@@ -252,11 +252,11 @@ nine_csmt_pause( struct NineDevice9 *device )
if (nine_queue_no_flushed_work(ctx->pool))
return;
- pipe_mutex_lock(ctx->thread_resume);
+ mtx_lock(&ctx->thread_resume);
p_atomic_set(&ctx->toPause, TRUE);
/* Wait the thread is paused */
- pipe_mutex_lock(ctx->thread_running);
+ mtx_lock(&ctx->thread_running);
ctx->hasPaused = TRUE;
p_atomic_set(&ctx->toPause, FALSE);
}