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

@@ -2624,7 +2624,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)
@@ -2639,7 +2639,7 @@ __cold void osal_jitter(bool tiny) {
break;
}
#else
sched_yield();
osal_yield();
if (coin > 43 * 2 / 3)
usleep(coin);
#endif