mdbx: extract internal osal_yield() (backport).

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

View File

@@ -171,6 +171,14 @@ typedef char pathchar_t;
#define MDBX_PRIsPATH "s"
#endif
static inline bool osal_yield(void) {
#if defined(_WIN32) || defined(_WIN64)
return SleepEx(0, true) == WAIT_IO_COMPLETION;
#else
return sched_yield() != 0;
#endif
}
typedef struct osal_mmap {
union {
void *base;