summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/unix/coroutine.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sysdep/unix/coroutine.c b/sysdep/unix/coroutine.c
index e4657157..4747d01a 100644
--- a/sysdep/unix/coroutine.c
+++ b/sysdep/unix/coroutine.c
@@ -201,5 +201,6 @@ struct coroutine *coro_run(pool *p, void (*entry)(void *), void *data)
void
coro_yield(void)
{
- usleep(100);
+ const struct timespec req = { .tv_nsec = 100 };
+ nanosleep(&req, NULL);
}