mirror of
https://github.com/isar/libmdbx.git
synced 2025-09-16 15:42:19 +08:00
mdbx: extract internal osal_yield()
.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user