I'd like to export a yielding function to the drivers.
Bool xf86Yield(int yield_if)
which will yield if the implementation yields in the way
specified or a better way, but does nothing otherwise.
yield_if can be:
YIELD_ALWAYS
Give up the CPU even if it means you sit out for at least a jiffy.
YIELD_RESCHEDULE
Give up the CPU even if it means you could lose the rest of your slice.
Don't do anything otherwise.
YIELD_FAST
Give up the CPU only if you don't lose the rest of your slice.
Don't do anything otherwise.
It returns FALSE if it didn't yield.
Do these sound like the right values for such a function?
I assume that for Linux they map as follows:
Pre GLIBC 2, YIELD_ALWAYS with usleep(0)
Post GLIBC 2, YIELD_FAST with sched_yield()
Which GLIBC corresponds to the YIELD_RESCHEDULE version of sched_yield()?
What about FreeBSD?
Mark.
_______________________________________________
Devel mailing list
[EMAIL PROTECTED]
http://XFree86.Org/mailman/listinfo/devel