Skip to content
Snippets Groups Projects
Commit 29777da6 authored by Michael Tüxen's avatar Michael Tüxen
Browse files

Don't do busy waiting on FreeBSD when waiting.

FreeBSD supports usleep(), so use it.
Sonsored by Netflix.
parent 0b72293d
No related branches found
No related tags found
No related merge requests found
......@@ -328,7 +328,7 @@ void wait_for_event(struct state *state)
* that we know has a fine-grained usleep(), then
* usleep() instead of spinning on the CPU.
*/
#ifdef linux
#if defined(linux) || defined(__FreeBSD__)
/* Since the scheduler may not wake us up precisely
* when we tell it to, sleep until just before the
* event we're waiting for and then spin.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment