From 0674b229ee9c17a7c5f7b2b0d205e7f0b9d29047 Mon Sep 17 00:00:00 2001 From: Andreas Beckmann Date: Mon, 27 Jun 2022 13:49:53 +0200 Subject: [PATCH] [PATCH 1/3] drop unused POCL_ATOMIC_CAS Gbp-Pq: Name 1018-drop-unused-POCL_ATOMIC_CAS.patch --- lib/CL/pocl_cl.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/lib/CL/pocl_cl.h b/lib/CL/pocl_cl.h index fc9f225..3600d5b 100644 --- a/lib/CL/pocl_cl.h +++ b/lib/CL/pocl_cl.h @@ -80,14 +80,10 @@ typedef pthread_t pocl_thread_t; /* See: https://gcc.gnu.org/onlinedocs/gcc-4.1.2/gcc/Atomic-Builtins.html */ #define POCL_ATOMIC_INC(x) __sync_add_and_fetch (&x, 1) #define POCL_ATOMIC_DEC(x) __sync_sub_and_fetch (&x, 1) -#define POCL_ATOMIC_CAS(ptr, oldval, newval) \ - __sync_val_compare_and_swap (ptr, oldval, newval) #elif defined(_WIN32) #define POCL_ATOMIC_INC(x) InterlockedIncrement64 (&x) #define POCL_ATOMIC_DEC(x) InterlockedDecrement64 (&x) -#define POCL_ATOMIC_CAS(ptr, oldval, newval) \ - InterlockedCompareExchange64 (ptr, newval, oldval) #else #error Need atomic_inc() builtin for this compiler #endif -- 2.30.2