From b1b6abfb5f4b4fa6135bd39d4921238558fe4a76 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Thu, 2 Dec 2021 01:53:31 +0100 Subject: [PATCH] [PATCH 68/90] move PTHREAD_CHECK() to pocl_cl.h Gbp-Pq: Name 0068-move-PTHREAD_CHECK-to-pocl_cl.h.patch --- lib/CL/pocl_cl.h | 14 ++++++++++++++ lib/CL/pocl_util.h | 5 ----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/CL/pocl_cl.h b/lib/CL/pocl_cl.h index 14635df..0b3f096 100644 --- a/lib/CL/pocl_cl.h +++ b/lib/CL/pocl_cl.h @@ -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. */ diff --git a/lib/CL/pocl_util.h b/lib/CL/pocl_util.h index 0fcd73d..2290124 100644 --- a/lib/CL/pocl_util.h +++ b/lib/CL/pocl_util.h @@ -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 -- 2.30.2