[PATCH:intel-gpu-tools 3/6] Use sched_yield if pthread_yield is not available

Mark Kettenis mark.kettenis at xs4all.nl
Fri Jan 6 14:49:52 PST 2012

> From: Alan Coopersmith <alan.coopersmith at oracle.com>
> Date: Fri,  6 Jan 2012 14:37:18 -0800
> Despite the name implying it's a standard part of the POSIX threads API,
> pthread_yield is actually non-standard and not entirely portable.  For
> systems like Solaris that don't have it, fall back to sched_yield.

Given that the Linux pthread_yield(3) man page explicitly says that
one should use sched_yield(2) instead, I'd say you should just replace
pthread_yield(3) with sched_yield(2) and forget about the
autoconfigury bits.

More information about the xorg-devel mailing list