summaryrefslogtreecommitdiff
path: root/mysys/lf_alloc-pin.c
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2020-07-27 13:34:37 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2020-07-27 13:34:37 +0200
commit4fae3c56b6a9d26e53570fc2468291d92a3c2a5b (patch)
tree4057805a880d550fea7a0e6f758b93e0de1855b9 /mysys/lf_alloc-pin.c
parent6898eae7f8ef3f0b773687c0308520f072da0bc9 (diff)
downloadmariadb-git-10.2-sysprg-MDEV-21910.tar.gz
MDEV-21910: merge reworked 10.4-MDEV-21910 patch into 10.210.2-sysprg-MDEV-21910
Diffstat (limited to 'mysys/lf_alloc-pin.c')
-rw-r--r--mysys/lf_alloc-pin.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mysys/lf_alloc-pin.c b/mysys/lf_alloc-pin.c
index 0dc524be336..1e7219b3296 100644
--- a/mysys/lf_alloc-pin.c
+++ b/mysys/lf_alloc-pin.c
@@ -102,6 +102,7 @@
#include <my_global.h>
#include <my_sys.h>
#include <lf.h>
+#include "my_cpu.h"
/*
when using alloca() leave at least that many bytes of the stack -
@@ -430,7 +431,7 @@ static void alloc_free(uchar *first,
{
anext_node(last)= tmp.node;
} while (!my_atomic_casptr((void **)(char *)&allocator->top,
- (void **)&tmp.ptr, first) && LF_BACKOFF);
+ (void **)&tmp.ptr, first) && LF_BACKOFF());
}
/*
@@ -501,7 +502,7 @@ void *lf_alloc_new(LF_PINS *pins)
{
node= allocator->top;
lf_pin(pins, 0, node);
- } while (node != allocator->top && LF_BACKOFF);
+ } while (node != allocator->top && LF_BACKOFF());
if (!node)
{
node= (void *)my_malloc(allocator->element_size, MYF(MY_WME));