Ian Romanick wrote (in a message from Monday 22)
> Mark Vojkovich wrote:
>
> > Can we export to the drivers some function that yields the CPU?
> > Currently alot of drivers burn the CPU waiting for fifos, etc...
> > usleep(0) is not good for this because it's jiffy based and usually
> > never returns in less than 10 msec which has the effect of making
> > interactivity worse instead of better. I'm not sure which platforms
> > don't export sched_yield() and which will need alternative
> > implementations.
>
> There was a thread about this on the dri-devel list some months ago.
> The short answer is DON'T DO IT! :) I don't think that sched_yield will
> give the desired results in the 2D driver any more than it does in the
> 3D driver. I *believe* that there is another function for this purpose,
> but I can't recall what it is called.
Sched_yield() is not portable enough. On most systems a poll() or
select() with a zero timeout should be better. May be even
nanosleep(0).
Matthieu
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel