summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_queue.c42
-rw-r--r--src/gallium/auxiliary/util/u_queue.h2
2 files changed, 24 insertions, 20 deletions
diff --git a/src/gallium/auxiliary/util/u_queue.c b/src/gallium/auxiliary/util/u_queue.c
index 52cfc0a4bf2..386dc4a9946 100644
--- a/src/gallium/auxiliary/util/u_queue.c
+++ b/src/gallium/auxiliary/util/u_queue.c
@@ -88,7 +88,7 @@ remove_from_atexit_list(struct util_queue *queue)
}
/****************************************************************************
- * util_queue implementation
+ * util_queue_fence
*/
static void
@@ -101,7 +101,7 @@ util_queue_fence_signal(struct util_queue_fence *fence)
}
void
-util_queue_job_wait(struct util_queue_fence *fence)
+util_queue_fence_wait(struct util_queue_fence *fence)
{
pipe_mutex_lock(fence->mutex);
while (!fence->signalled)
@@ -109,6 +109,27 @@ util_queue_job_wait(struct util_queue_fence *fence)
pipe_mutex_unlock(fence->mutex);
}
+void
+util_queue_fence_init(struct util_queue_fence *fence)
+{
+ memset(fence, 0, sizeof(*fence));
+ pipe_mutex_init(fence->mutex);
+ pipe_condvar_init(fence->cond);
+ fence->signalled = true;
+}
+
+void
+util_queue_fence_destroy(struct util_queue_fence *fence)
+{
+ assert(fence->signalled);
+ pipe_condvar_destroy(fence->cond);
+ pipe_mutex_destroy(fence->mutex);
+}
+
+/****************************************************************************
+ * util_queue implementation
+ */
+
struct thread_input {
struct util_queue *queue;
int thread_index;
@@ -267,23 +288,6 @@ util_queue_destroy(struct util_queue *queue)
}
void
-util_queue_fence_init(struct util_queue_fence *fence)
-{
- memset(fence, 0, sizeof(*fence));
- pipe_mutex_init(fence->mutex);
- pipe_condvar_init(fence->cond);
- fence->signalled = true;
-}
-
-void
-util_queue_fence_destroy(struct util_queue_fence *fence)
-{
- assert(fence->signalled);
- pipe_condvar_destroy(fence->cond);
- pipe_mutex_destroy(fence->mutex);
-}
-
-void
util_queue_add_job(struct util_queue *queue,
void *job,
struct util_queue_fence *fence,
diff --git a/src/gallium/auxiliary/util/u_queue.h b/src/gallium/auxiliary/util/u_queue.h
index 335813f63c1..2e0a5a36e26 100644
--- a/src/gallium/auxiliary/util/u_queue.h
+++ b/src/gallium/auxiliary/util/u_queue.h
@@ -87,7 +87,7 @@ void util_queue_add_job(struct util_queue *queue,
util_queue_execute_func execute,
util_queue_execute_func cleanup);
-void util_queue_job_wait(struct util_queue_fence *fence);
+void util_queue_fence_wait(struct util_queue_fence *fence);
int64_t util_queue_get_thread_time_nano(struct util_queue *queue,
unsigned thread_index);