diff options
author | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-10-22 17:38:29 +0200 |
---|---|---|
committer | Nicolai Hähnle <nicolai.haehnle@amd.com> | 2017-11-03 19:38:40 +0100 |
commit | 4fe61d31ae7c0c56281ea435e99f4e6204e3b3f5 (patch) | |
tree | d0790001acca7a36fcd15acb24ef7bedbf40284f | |
parent | 65e54336398ad4b8d9c0d4250e1b550558d6b4ed (diff) |
u_queue: group fence functions together
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
-rw-r--r-- | src/util/u_queue.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/util/u_queue.h b/src/util/u_queue.h index ff713ae54d..7a028ef084 100644 --- a/src/util/u_queue.h +++ b/src/util/u_queue.h @@ -54,6 +54,16 @@ struct util_queue_fence { int signalled; }; +void util_queue_fence_init(struct util_queue_fence *fence); +void util_queue_fence_destroy(struct util_queue_fence *fence); +void util_queue_fence_wait(struct util_queue_fence *fence); + +static inline bool +util_queue_fence_is_signalled(struct util_queue_fence *fence) +{ + return fence->signalled != 0; +} + typedef void (*util_queue_execute_func)(void *job, int thread_index); struct util_queue_job { @@ -88,8 +98,6 @@ bool util_queue_init(struct util_queue *queue, unsigned num_threads, unsigned flags); void util_queue_destroy(struct util_queue *queue); -void util_queue_fence_init(struct util_queue_fence *fence); -void util_queue_fence_destroy(struct util_queue_fence *fence); /* optional cleanup callback is called after fence is signaled: */ void util_queue_add_job(struct util_queue *queue, @@ -100,7 +108,6 @@ void util_queue_add_job(struct util_queue *queue, void util_queue_drop_job(struct util_queue *queue, 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); @@ -111,12 +118,6 @@ util_queue_is_initialized(struct util_queue *queue) return queue->threads != NULL; } -static inline bool -util_queue_fence_is_signalled(struct util_queue_fence *fence) -{ - return fence->signalled != 0; -} - /* Convenient structure for monitoring the queue externally and passing * the structure between Mesa components. The queue doesn't use it directly. */ |