diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-28 08:28:39 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-10-28 08:28:39 +0300 |
commit | 3a79e5fd317316c293baa459e8296fdb0744c280 (patch) | |
tree | 9ff2059bbd651715daa6a1d7241c0ddd303c0071 /include | |
parent | 7948a1dc53eccc23095a83daa5fd6b3bfaedf7f2 (diff) | |
parent | 657bcf928eb1c6a80ee2c82f0dcdd59ab02927e4 (diff) | |
download | mariadb-git-3a79e5fd317316c293baa459e8296fdb0744c280.tar.gz |
Merge 10.3 into 10.4
Diffstat (limited to 'include')
-rw-r--r-- | include/my_pthread.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/my_pthread.h b/include/my_pthread.h index bc47bb8bad0..65498d185c5 100644 --- a/include/my_pthread.h +++ b/include/my_pthread.h @@ -298,16 +298,18 @@ void my_pthread_attr_getstacksize(pthread_attr_t *attrib, size_t *size); int my_pthread_mutex_trylock(pthread_mutex_t *mutex); #endif -#if !defined(HAVE_PTHREAD_YIELD_ZERO_ARG) -/* no pthread_yield() available */ #ifdef HAVE_SCHED_YIELD #define pthread_yield() sched_yield() -#elif defined(HAVE_PTHREAD_YIELD_NP) /* can be Mac OS X */ +#else +#if !defined(HAVE_PTHREAD_YIELD_ZERO_ARG) +/* no pthread_yield() available */ +#if defined(HAVE_PTHREAD_YIELD_NP) /* can be Mac OS X */ #define pthread_yield() pthread_yield_np() #elif defined(HAVE_THR_YIELD) #define pthread_yield() thr_yield() -#endif -#endif +#endif //defined(HAVE_PTHREAD_YIELD_NP) +#endif //!defined(HAVE_PTHREAD_YIELD_ZERO_ARG) +#endif //HAVE_SCHED_YIELD /* The defines set_timespec and set_timespec_nsec should be used |