diff options
author | Sergey Vojtovich <svoj@mariadb.org> | 2017-12-07 15:03:59 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2017-12-08 13:44:45 +0200 |
commit | b3346c2f41d0f7bd0d919826592b37ae09fa41c8 (patch) | |
tree | f9bd618332962cf5bbd3207e536d76f3a011e3ad /mysys | |
parent | 07e9ff1fe18999e1acd640ee3b2169c3f506fb35 (diff) | |
download | mariadb-git-b3346c2f41d0f7bd0d919826592b37ae09fa41c8.tar.gz |
Restore LF_BACKOFF
Moved InnoDB UT_RELAX_CPU() to server. Restored cross-platform LF_BACKOFF
implementation basing on UT_RELAX_CPU().
Diffstat (limited to 'mysys')
-rw-r--r-- | mysys/lf_alloc-pin.c | 4 | ||||
-rw-r--r-- | mysys/lf_hash.c | 6 | ||||
-rw-r--r-- | mysys/waiting_threads.c | 2 |
3 files changed, 6 insertions, 6 deletions
diff --git a/mysys/lf_alloc-pin.c b/mysys/lf_alloc-pin.c index bf2b8a12846..8a96fccf16a 100644 --- a/mysys/lf_alloc-pin.c +++ b/mysys/lf_alloc-pin.c @@ -430,7 +430,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 +501,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)); diff --git a/mysys/lf_hash.c b/mysys/lf_hash.c index 430f1007f30..6b3fa78475d 100644 --- a/mysys/lf_hash.c +++ b/mysys/lf_hash.c @@ -102,7 +102,7 @@ retry: do { /* PTR() isn't necessary below, head is a dummy node */ cursor->curr= (LF_SLIST *)(*cursor->prev); lf_pin(pins, 1, cursor->curr); - } while (*cursor->prev != (intptr)cursor->curr && LF_BACKOFF); + } while (*cursor->prev != (intptr)cursor->curr && LF_BACKOFF()); for (;;) { @@ -117,7 +117,7 @@ retry: link= cursor->curr->link; cursor->next= PTR(link); lf_pin(pins, 0, cursor->next); - } while (link != cursor->curr->link && LF_BACKOFF); + } while (link != cursor->curr->link && LF_BACKOFF()); if (!DELETED(link)) { @@ -145,7 +145,7 @@ retry: and remove this deleted node */ if (my_atomic_casptr((void **) cursor->prev, - (void **) &cursor->curr, cursor->next) && LF_BACKOFF) + (void **) &cursor->curr, cursor->next) && LF_BACKOFF()) lf_alloc_free(pins, cursor->curr); else goto retry; diff --git a/mysys/waiting_threads.c b/mysys/waiting_threads.c index 2549bd8a587..6a4139844db 100644 --- a/mysys/waiting_threads.c +++ b/mysys/waiting_threads.c @@ -617,7 +617,7 @@ retry: { rc= *shared_ptr; lf_pin(arg->thd->pins, 0, rc); - } while (rc != *shared_ptr && LF_BACKOFF); + } while (rc != *shared_ptr && LF_BACKOFF()); if (rc == 0) { |