mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-02 00:24:13 +08:00
mdbx: fix pthread_yield()
for non-GLIBC.
Change-Id: I080e37a42b62e524896dea8747e9f23e2fcd584f
This commit is contained in:
parent
787eaaa373
commit
fe65c122d2
@ -777,7 +777,9 @@ static __always_inline void atomic_yield(void) {
|
||||
defined(__mips64__) || defined(_M_MRX000) || defined(_MIPS_) || \
|
||||
defined(__MWERKS__) || defined(__sgi)
|
||||
__asm__ __volatile__(".word 0x00000140");
|
||||
#else
|
||||
#elif defined(__linux__) || defined(__gnu_linux__) || defined(_UNIX03_SOURCE)
|
||||
sched_yield();
|
||||
#elif (defined(_GNU_SOURCE) && __GLIBC_PREREQ(2, 1)) || defined(_OPEN_THREADS)
|
||||
pthread_yield();
|
||||
#endif
|
||||
}
|
||||
|
@ -119,6 +119,7 @@
|
||||
|
||||
#if defined(__linux__) || defined(__gnu_linux__)
|
||||
#include <linux/sysctl.h>
|
||||
#include <sched.h>
|
||||
#include <sys/sendfile.h>
|
||||
#include <sys/statfs.h>
|
||||
#endif /* Linux */
|
||||
|
Loading…
x
Reference in New Issue
Block a user