From cd4377fab21e0f500bef7f06543fa848a039c1e0 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Thu, 20 Jul 2023 06:50:01 +0200 Subject: Merging upstream version 1.41.0. Signed-off-by: Daniel Baumann --- libnetdata/july/july.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libnetdata/july/july.c') diff --git a/libnetdata/july/july.c b/libnetdata/july/july.c index 0ad5f13e5..56b8494b3 100644 --- a/libnetdata/july/july.c +++ b/libnetdata/july/july.c @@ -59,7 +59,7 @@ static struct { void julyl_cleanup1(void) { struct JulyL *item = NULL; - if(!netdata_spinlock_trylock(&julyl_globals.protected.spinlock)) + if(!spinlock_trylock(&julyl_globals.protected.spinlock)) return; if(julyl_globals.protected.available_items && julyl_globals.protected.available > 10) { @@ -68,7 +68,7 @@ void julyl_cleanup1(void) { julyl_globals.protected.available--; } - netdata_spinlock_unlock(&julyl_globals.protected.spinlock); + spinlock_unlock(&julyl_globals.protected.spinlock); if(item) { size_t bytes = item->bytes; @@ -81,7 +81,7 @@ void julyl_cleanup1(void) { struct JulyL *julyl_get(void) { struct JulyL *j; - netdata_spinlock_lock(&julyl_globals.protected.spinlock); + spinlock_lock(&julyl_globals.protected.spinlock); j = julyl_globals.protected.available_items; if(likely(j)) { @@ -89,7 +89,7 @@ struct JulyL *julyl_get(void) { julyl_globals.protected.available--; } - netdata_spinlock_unlock(&julyl_globals.protected.spinlock); + spinlock_unlock(&julyl_globals.protected.spinlock); if(unlikely(!j)) { size_t bytes = sizeof(struct JulyL) + JULYL_MIN_ENTRIES * sizeof(struct JulyL_item); @@ -113,10 +113,10 @@ static void julyl_release(struct JulyL *j) { __atomic_add_fetch(&julyl_globals.atomics.bytes_moved, j->bytes_moved, __ATOMIC_RELAXED); __atomic_add_fetch(&julyl_globals.atomics.reallocs, j->reallocs, __ATOMIC_RELAXED); - netdata_spinlock_lock(&julyl_globals.protected.spinlock); + spinlock_lock(&julyl_globals.protected.spinlock); DOUBLE_LINKED_LIST_APPEND_ITEM_UNSAFE(julyl_globals.protected.available_items, j, cache.prev, cache.next); julyl_globals.protected.available++; - netdata_spinlock_unlock(&julyl_globals.protected.spinlock); + spinlock_unlock(&julyl_globals.protected.spinlock); } size_t julyl_cache_size(void) { -- cgit v1.2.3