Re: setitimer() not working in 1.3.76?

Linus Torvalds (torvalds@cs.helsinki.fi)
Thu, 21 Mar 1996 08:46:05 +0200 (EET)


On Wed, 20 Mar 1996, Jin S. Choi wrote:
>
> I found while trying to compile the benchmarks that come with the
> glibc crypt implementation that itimers don't appear to be
> working. I've attached a test case. It should count down from 2 to 0
> then print "All done!" and exit. For me, it loops printing "we should
> be done". On my friend's machine running 1.3.68, it does the right
> thing.

Oops. Silly me.

This should be easy to fix: in linux/kernel/sched.c there are two
functions called "do_it_virt" and "do_it_prof"- They both have a test
that looks like

if (it_xxxx < ticks) {

Just change the "<" to "<=" and you should be ok, I think (untested, but
looking at the code it looks like a very silly bug). Thanks for the nice
bug-report,

Linus