mdbx: extract internal osal_yield().

This commit is contained in:
Леонид Юрьев (Leonid Yuriev)
2025-09-07 13:16:22 +03:00
parent 74ef6502e3
commit 815d483803
8 changed files with 15 additions and 30 deletions

View File

@@ -171,10 +171,8 @@ MDBX_MAYBE_UNUSED static __always_inline void atomic_yield(void) {
#elif defined(__mips) || defined(__mips__) || defined(__mips64) || defined(__mips64__) || defined(_M_MRX000) || \
defined(_MIPS_) || defined(__MWERKS__) || defined(__sgi)
__asm__ __volatile__(".word 0x00000140");
#elif defined(__linux__) || defined(__gnu_linux__) || defined(_UNIX03_SOURCE)
sched_yield();
#elif (defined(_GNU_SOURCE) && __GLIBC_PREREQ(2, 1)) || defined(_OPEN_THREADS)
pthread_yield();
#else
osal_yield();
#endif
}