Re: [AD] CPU yielding patch |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Vincent Penquerc'h <lyrian@xxxxxxxxxx> writes:
> I don't know why, but when using the sched_yield one, a program still
> takes up nearly 100% time, so there could be a hidden flaw here.
Perhaps because nothing else wants that timeslice, so the scheduler just
gives it straight back to you? The real test is to run some processor
hogging task alongside your program that is yielding, and see whether this
makes any difference in how much CPU is given to you vs. the other process.
> Shawn: I won't be angry at you if you decide to not include it, as I did
> this under your back ;)
I don't have a problem with it, since some people obviously want this. I do
think that the Unix yielding code should be put in a shared file in the
src/unix directory, though, so the console and X drivers can both point
themselves at the same implementation, rather than needing two copies of
that same code...
--
Shawn Hargreaves - shawn@xxxxxxxxxx - http://www.talula.demon.co.uk/
"A binary is barely software: it's more like hardware on a floppy disk."