]> git.ipfire.org Git - thirdparty/knot-dns.git/commitdiff
contrib/atomic: remove the __sync variant of atomic operations (obsolete)
authorDavid Vašek <david.vasek@nic.cz>
Fri, 3 Nov 2023 19:29:57 +0000 (20:29 +0100)
committerDavid Vašek <david.vasek@nic.cz>
Tue, 14 Nov 2023 15:27:57 +0000 (16:27 +0100)
src/contrib/atomic.h

index e102e087879078277c569c24151ca4776e8fbd22..e46ffa1b703b3b59c41af74eca9713002d05af12 100644 (file)
  #define ATOMIC_ADD(dst, val) __atomic_add_fetch(&(dst), (val), __ATOMIC_RELAXED)
  #define ATOMIC_SUB(dst, val) __atomic_sub_fetch(&(dst), (val), __ATOMIC_RELAXED)
 
- typedef uint64_t knot_atomic_uint64_t;
- typedef size_t knot_atomic_size_t;
-#elif defined(HAVE_SYNC_ATOMIC)      /* obsolete GCC, partial support only. */
- #warning "Full atomic operations not availabe, using partially unreliable replacement."
-
- #define ATOMIC_SET(dst, val) ((dst) = (val))
- #define ATOMIC_GET(src)      __sync_fetch_and_or(&(src), 0)
- #define ATOMIC_ADD(dst, val) __sync_add_and_fetch(&(dst), (val))
- #define ATOMIC_SUB(dst, val) __sync_sub_and_fetch(&(dst), (val))
-
  typedef uint64_t knot_atomic_uint64_t;
  typedef size_t knot_atomic_size_t;
 #else                                /* Fallback, non-atomic. */