summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2021-10-28 12:24:31 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2021-10-28 12:24:31 +0200
commitb3cdf4168cbfd4b20db01b8296f5800529f5713f (patch)
treecc4e561056dff3a34fc1cc644939514f9363582e
parent99c893586c16f915ebc4e03f184aeaf0af10dd5c (diff)
downloadmariadb-git-b3cdf4168cbfd4b20db01b8296f5800529f5713f.tar.gz
fix depricated pthread_yield() for tokudb
-rw-r--r--storage/tokudb/PerconaFT/portability/toku_pthread.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/storage/tokudb/PerconaFT/portability/toku_pthread.cc b/storage/tokudb/PerconaFT/portability/toku_pthread.cc
index fe8a4d485cd..c066a734bae 100644
--- a/storage/tokudb/PerconaFT/portability/toku_pthread.cc
+++ b/storage/tokudb/PerconaFT/portability/toku_pthread.cc
@@ -55,7 +55,9 @@ Copyright (c) 2006, 2015, Percona and/or its affiliates. All rights reserved.
#include <toku_pthread.h>
int toku_pthread_yield(void) {
-#if defined(HAVE_PTHREAD_YIELD)
+#if defined(HAVE_SCHED_YIELD)
+ return sched_yield();
+#elif defined(HAVE_PTHREAD_YIELD)
# if defined(PTHREAD_YIELD_RETURNS_INT)
return pthread_yield();
# elif defined(PTHREAD_YIELD_RETURNS_VOID)