[PATCH 68/90] move PTHREAD_CHECK() to pocl_cl.h
authorAndreas Beckmann <anbe@debian.org>
Thu, 2 Dec 2021 00:53:31 +0000 (01:53 +0100)
committerAndreas Beckmann <anbe@debian.org>
Fri, 7 Jan 2022 23:55:22 +0000 (23:55 +0000)
Gbp-Pq: Name 0068-move-PTHREAD_CHECK-to-pocl_cl.h.patch

lib/CL/pocl_cl.h
lib/CL/pocl_util.h

index 14635dffe9ff7e92d876d77d1a5bea2001ecf8e7..0b3f0960f9d963f94b224b7df5e0e66d8dbf44e1 100644 (file)
@@ -104,6 +104,20 @@ typedef pthread_t pocl_thread_t;
 #define ALIGN_CACHE(x) x
 #endif
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+POCL_EXPORT
+void pocl_abort_on_pthread_error (int status, unsigned line, const char *func);
+
+#ifdef __cplusplus
+}
+#endif
+
+#define PTHREAD_CHECK(code)                                                   \
+  pocl_abort_on_pthread_error ((code), __LINE__, __FUNCTION__);
+
 /* Generic functionality for handling different types of 
    OpenCL (host) objects. */
 
index 0fcd73dc1d95a6c1571ee2bdd61f3757cc24eba4..2290124b08d39918e8a5948bad6f18103be2d7e2 100644 (file)
@@ -187,11 +187,6 @@ int pocl_check_event_wait_list(cl_command_queue     command_queue,
                                cl_uint              num_events_in_wait_list,
                                const cl_event *     event_wait_list);
 
-void pocl_abort_on_pthread_error (int status, unsigned line, const char *func);
-
-#define PTHREAD_CHECK(code)                                                   \
-  pocl_abort_on_pthread_error ((code), __LINE__, __FUNCTION__);
-
 void pocl_update_event_queued (cl_event event);
 
 POCL_EXPORT