From a54fcb7d75655801b27ebc310320e505cadac85a Mon Sep 17 00:00:00 2001 From: vkalintiris Date: Thu, 7 Jul 2022 11:09:56 +0300 Subject: Fix two helgrind reports (#13325) * Use atomics ops with host->rrdpush_sender_connected. * Use different storage unit for rrdim's updated and exposed fields. The bitfields would end up in the same byte and thus requiring explicit protection with mutexes. --- daemon/analytics.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'daemon') diff --git a/daemon/analytics.c b/daemon/analytics.c index 69f6fe4c2d..6090169446 100644 --- a/daemon/analytics.c +++ b/daemon/analytics.c @@ -382,7 +382,7 @@ void analytics_https(void) BUFFER *b = buffer_create(30); #ifdef ENABLE_HTTPS analytics_exporting_connectors_ssl(b); - buffer_strcat(b, netdata_client_ctx && localhost->ssl.flags == NETDATA_SSL_HANDSHAKE_COMPLETE && localhost->rrdpush_sender_connected == 1 ? "streaming|" : "|"); + buffer_strcat(b, netdata_client_ctx && localhost->ssl.flags == NETDATA_SSL_HANDSHAKE_COMPLETE && __atomic_load_n(&localhost->rrdpush_sender_connected, __ATOMIC_SEQ_CST) ? "streaming|" : "|"); buffer_strcat(b, netdata_srv_ctx ? "web" : ""); #else buffer_strcat(b, "||"); -- cgit v1.2.3