torvalds@transmeta.com (Linus Torvalds) writes:
> You should really make sure it does a "sched_yield()" instead of
> pause().
>
> Doing a pause() will force a re-schedule, but there is no guarantee that
> it will actually schedule anything else: the kernel may well decide that
> the pausing process is still a good process to use.
>
> If using the proper sched_yield() doesn't fix it for you, I'd really
> need to see the binary or something in order to tell you what's wrong.
>
> Linus
As suggested, we tried the function "sched_yield()" instead of
"pause()" with kernel 2.1.119. Although, the function "sched_yield()"
does not produce the desired behavior since "sched_yield()" does not
wait for an interrupt. The function "pause()" waits until a new
interrupt is raised to return. Should we use "sched_yield()" and then
"pause()" ? Or should we use something else ?
Our code is organized like this
while ( sm_running ) {
/*
main computations section
*/
pause(); /* wait for next interrupt */
}
The interrupt handler only counts the number of times it was
called. It is only used to keep execution statistics.
Claude
-- Claude Gamache, CAE Electronique Ltee, 8585 Cote-de-Liesse Saint-Laurent, Quebec, Canada H4T 1G6 Email: cgamache@cae.ca Tel.: (514) 341-2000 x3194- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html