diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-07-20 04:49:55 +0000 |
commit | ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb (patch) | |
tree | 7a900833aad3ccc685712c6c2a7d87576d54f427 /libnetdata/july | |
parent | Adding upstream version 1.40.1. (diff) | |
download | netdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.tar.xz netdata-ab1bb5b7f1c3c3a7b240ab7fc8661459ecd7decb.zip |
Adding upstream version 1.41.0.upstream/1.41.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'libnetdata/july')
-rw-r--r-- | libnetdata/july/july.c | 12 |
1 files changed, 6 insertions, 6 deletions
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) { |