[Mesa-dev] [PATCH 6/8] util/u_queue: make u_queue accessible to cpp
Timothy Arceri
tarceri at itsqueeze.com
Fri Mar 10 02:28:53 UTC 2017
---
src/util/u_queue.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/src/util/u_queue.h b/src/util/u_queue.h
index 0073890..4aec1f2 100644
--- a/src/util/u_queue.h
+++ b/src/util/u_queue.h
@@ -31,20 +31,24 @@
*/
#ifndef U_QUEUE_H
#define U_QUEUE_H
#include <string.h>
#include "util/list.h"
#include "util/u_thread.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Job completion fence.
* Put this into your job structure.
*/
struct util_queue_fence {
mtx_t mutex;
cnd_t cond;
int signalled;
};
typedef void (*util_queue_execute_func)(void *job, int thread_index);
@@ -99,11 +103,15 @@ 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;
}
+#ifdef __cplusplus
+}
+#endif
+
#endif
--
2.9.3
More information about the mesa-dev
mailing list