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

@@ -593,11 +593,6 @@ int osal_actor_poll(mdbx_pid_t &pid, unsigned timeout) {
return sigbreak ? EINTR : 0 /* timeout */;
}
void osal_yield(void) {
if (sched_yield())
failure_perror("sched_yield()", errno);
}
void osal_udelay(size_t us) {
chrono::time until, now = chrono::now_monotonic();
until.fixedpoint = now.fixedpoint + chrono::from_us(us).fixedpoint;

View File

@@ -401,8 +401,6 @@ int osal_actor_poll(mdbx_pid_t &pid, unsigned timeout) {
}
}
void osal_yield(void) { SwitchToThread(); }
void osal_udelay(size_t us) {
chrono::time until, now = chrono::now_monotonic();
until.fixedpoint = now.fixedpoint + chrono::from_us(us).fixedpoint;

View File

@@ -20,7 +20,6 @@ bool osal_multiactor_mode(void);
int osal_delay(unsigned seconds);
void osal_udelay(size_t us);
void osal_yield(void);
bool osal_istty(int fd);
std::string osal_tempdir(void);