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

@@ -2638,7 +2638,7 @@ __cold void osal_jitter(bool tiny) {
break;
#if defined(_WIN32) || defined(_WIN64)
if (coin < 43 * 2 / 3)
SwitchToThread();
osal_yield();
else {
static HANDLE timer;
if (!timer)
@@ -2653,7 +2653,7 @@ __cold void osal_jitter(bool tiny) {
break;
}
#else
sched_yield();
osal_yield();
if (coin > 43 * 2 / 3)
usleep(coin);
#endif