summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--src/contrib/atomic.h6
-rw-r--r--src/knot/modules/cookies/cookies.c5
2 files changed, 0 insertions, 11 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>
diff --git a/src/knot/modules/cookies/cookies.c b/src/knot/modules/cookies/cookies.c
index d5508ac81..706258bb0 100644
--- a/src/knot/modules/cookies/cookies.c
+++ b/src/knot/modules/cookies/cookies.c
@@ -299,11 +299,6 @@ int cookies_load(knotd_mod_t *mod)
}
}
-#ifndef KNOT_HAVE_ATOMIC
- knotd_mod_log(mod, LOG_WARNING, "the module might work slightly wrong on this platform");
- ctx->badcookie_slip = 1;
-#endif
-
return knotd_mod_hook(mod, KNOTD_STAGE_BEGIN, cookies_process);
}