perf(userland): replace sys_yield with sleep for WAY better idle efficiency

This commit is contained in:
boreddevnl
2026-05-11 19:52:43 +02:00
parent 78a9afebf4
commit a3a4494265
7 changed files with 9 additions and 8 deletions

View File

@@ -158,7 +158,7 @@ static int _b_pipe_read(fd_handle_t *h, void *buf, size_t count) {
}
break;
}
sys_yield();
sleep(1);
continue;
}
@@ -193,7 +193,7 @@ static int _b_pipe_write(fd_handle_t *h, const void *buf, size_t count) {
}
break;
}
sys_yield();
sleep(1);
continue;
}

View File

@@ -3,6 +3,7 @@
#include "errno.h"
#include "stdio.h"
#include "stdlib.h"
#include "string.h"
#include "sys/types.h"
#include "sys/wait.h"
@@ -219,6 +220,6 @@ __attribute__((weak)) pid_t waitpid(pid_t pid, int *status, int options) {
errno = ECHILD;
return -1;
}
sys_yield();
sleep(1);
}
}