From: Andreas Beckmann Date: Mon, 27 Jun 2022 11:49:53 +0000 (+0200) Subject: [PATCH 1/3] drop unused POCL_ATOMIC_CAS X-Git-Tag: archive/raspbian/3.0-7+rpi1^2~11 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=13bf5dae20c31ef49f559eb29f6dd3d4761e49a6;p=pocl.git [PATCH 1/3] drop unused POCL_ATOMIC_CAS Gbp-Pq: Name 1018-drop-unused-POCL_ATOMIC_CAS.patch --- 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