From 0a006d2258625b46043b38f62fedfcd0a8ee470c Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 29 Jan 2020 10:37:44 +0100 Subject: [PATCH] host: fix global declarations --- src/host.c | 7 +++++++ src/host.h | 10 +++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/host.c b/src/host.c index 548b31abbb..4e79be14da 100644 --- a/src/host.c +++ b/src/host.c @@ -45,8 +45,15 @@ static Host *HostGetUsedHost(void); +/** host hash table */ +HostHashRow *host_hash; /** queue with spare hosts */ static HostQueue host_spare_q; +HostConfig host_config; + +SC_ATOMIC_DECLARE(uint64_t,host_memuse); +SC_ATOMIC_DECLARE(uint32_t,host_counter); +SC_ATOMIC_DECLARE(uint32_t,host_prune_idx); /** size of the host object. Maybe updated in HostInitConfig to include * the storage APIs additions. */ diff --git a/src/host.h b/src/host.h index 9a7b811b2a..e44cc5368a 100644 --- a/src/host.h +++ b/src/host.h @@ -87,7 +87,7 @@ typedef struct HostHashRow_ { } __attribute__((aligned(CLS))) HostHashRow; /** host hash table */ -HostHashRow *host_hash; +extern HostHashRow *host_hash; #define HOST_VERBOSE 0 #define HOST_QUIET 1 @@ -128,10 +128,10 @@ typedef struct HostConfig_ { } \ } while (0) -HostConfig host_config; -SC_ATOMIC_DECLARE(uint64_t,host_memuse); -SC_ATOMIC_DECLARE(uint32_t,host_counter); -SC_ATOMIC_DECLARE(uint32_t,host_prune_idx); +extern HostConfig host_config; +SC_ATOMIC_EXTERN(uint64_t,host_memuse); +SC_ATOMIC_EXTERN(uint32_t,host_counter); +SC_ATOMIC_EXTERN(uint32_t,host_prune_idx); void HostInitConfig(char quiet); void HostShutdown(void); -- 2.47.2