[Mesa-dev] [PATCH mesa 2/2] sched.h needs to be imported on Darwin/OSX targets.
Cherniak, Bruce
bruce.cherniak at intel.com
Thu Mar 15 03:00:28 UTC 2018
We don't currently build SWR on OS X, I've had difficulty building Mesa on OS X in general.
But, I'd be very interesting in learning. Thanks for the patch.
Reviewed-by: Bruce Cherniak <bruce.cherniak at intel.com>
> On Mar 14, 2018, at 6:19 PM, Jeremy Huddleston Sequoia <jeremyhu at apple.com> wrote:
>
> From: Apple SWE <jeremyhu at apple.com>
>
> 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 at apple.com>
> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at apple.com>
> ---
> src/gallium/drivers/swr/swr_fence.cpp | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/src/gallium/drivers/swr/swr_fence.cpp b/src/gallium/drivers/swr/swr_fence.cpp
> index 3005eb9aaa..b05ac8cec0 100644
> --- a/src/gallium/drivers/swr/swr_fence.cpp
> +++ b/src/gallium/drivers/swr/swr_fence.cpp
> @@ -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
> --
> 2.16.1 (Apple Git-102)
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list