sched.h needs to be imported on Darwin/OSX targets.

sched_yield is used but the include reference on Darwin is missing. This patch
conditionally guards on Darwin/OSX to import sched.h first.

Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Reviewed-by: Bruce Cherniak <bruce.cherniak@intel.com>
This commit is contained in:
Apple SWE
2018-03-13 18:29:45 -07:00
committed by Jeremy Huddleston Sequoia
parent 67f27b1e18
commit 361f79c97f

View File

@@ -29,6 +29,10 @@
#include "swr_screen.h"
#include "swr_fence.h"
#ifdef __APPLE__
#include <sched.h>
#endif
#if defined(PIPE_CC_MSVC) // portable thread yield
#define sched_yield SwitchToThread
#endif