From 29777da65393eaa11236e107086e7d05d69cba06 Mon Sep 17 00:00:00 2001 From: Michael Tuexen <tuexen@fh-muenster.de> Date: Wed, 15 Jun 2016 20:23:29 +0200 Subject: [PATCH] Don't do busy waiting on FreeBSD when waiting. FreeBSD supports usleep(), so use it. Sonsored by Netflix. --- gtests/net/packetdrill/run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtests/net/packetdrill/run.c b/gtests/net/packetdrill/run.c index 574c0cca..f033a318 100644 --- a/gtests/net/packetdrill/run.c +++ b/gtests/net/packetdrill/run.c @@ -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. -- GitLab