[Mesa-dev] [PATCH 3/7] u_queue: export util_queue_fence_signal
Nicolai Hähnle
nhaehnle at gmail.com
Sun Oct 22 18:33:40 UTC 2017
From: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/util/u_queue.c | 2 +-
src/util/u_queue.h | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/util/u_queue.c b/src/util/u_queue.c
index 3b05110e9f8..33436e0749a 100644
--- a/src/util/u_queue.c
+++ b/src/util/u_queue.c
@@ -82,21 +82,21 @@ remove_from_atexit_list(struct util_queue *queue)
break;
}
}
mtx_unlock(&exit_mutex);
}
/****************************************************************************
* util_queue_fence
*/
-static void
+void
util_queue_fence_signal(struct util_queue_fence *fence)
{
mtx_lock(&fence->mutex);
fence->signalled = true;
cnd_broadcast(&fence->cond);
mtx_unlock(&fence->mutex);
}
void
util_queue_fence_wait(struct util_queue_fence *fence)
diff --git a/src/util/u_queue.h b/src/util/u_queue.h
index 7a028ef0847..5a546e53fdc 100644
--- a/src/util/u_queue.h
+++ b/src/util/u_queue.h
@@ -50,20 +50,21 @@ extern "C" {
*/
struct util_queue_fence {
mtx_t mutex;
cnd_t cond;
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);
+void util_queue_fence_signal(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 {
--
2.11.0
More information about the mesa-dev
mailing list