summaryrefslogtreecommitdiffstats
path: root/src/contrib/atomic.h
diff options
context:
space:
mode:
authorJan Hák <jan.hak@nic.cz>2024-12-05 14:50:57 +0100
committerDaniel Salzman <daniel.salzman@nic.cz>2024-12-11 17:36:20 +0100
commit215a37785f16efef40cb8c9a45add496a3ef3f9e (patch)
tree605040f9963b8ff32221c33a9b45383bc7da75fb /src/contrib/atomic.h
parentcontrib/atomic: use volatile for the fallback implementation (diff)
downloadknot-215a37785f16efef40cb8c9a45add496a3ef3f9e.tar.xz
knot-215a37785f16efef40cb8c9a45add496a3ef3f9e.zip
contrib/atomic: remove of KNOT_HAVE_ATOMIC definition because of unused
Diffstat (limited to 'src/contrib/atomic.h')
-rw-r--r--src/contrib/atomic.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/src/contrib/atomic.h b/src/contrib/atomic.h
index 8a408b992..b8c34dd18 100644
--- a/src/contrib/atomic.h
+++ b/src/contrib/atomic.h
@@ -21,8 +21,6 @@
#pragma once
#ifdef HAVE_C11_ATOMIC /* C11 */
- #define KNOT_HAVE_ATOMIC
-
#include <stdatomic.h>
#define ATOMIC_INIT(dst, val) atomic_store_explicit(&(dst), (val), memory_order_relaxed)
@@ -39,8 +37,6 @@
typedef _Atomic (void *) knot_atomic_ptr_t;
typedef atomic_bool knot_atomic_bool;
#elif defined(HAVE_GCC_ATOMIC) /* GCC __atomic */
- #define KNOT_HAVE_ATOMIC
-
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>
@@ -59,8 +55,6 @@
typedef void* knot_atomic_ptr_t;
typedef bool knot_atomic_bool;
#else /* Fallback using spinlocks. Much slower. */
- #define KNOT_HAVE_ATOMIC
-
#include <stdint.h>
#include <stdbool.h>
#include <stddef.h>