Subject: order of callout expiry
To: None <>
From: David Laight <>
List: tech-kern
Date: 09/09/2002 15:54:36
I have been thinking about a slight difference between the
standard callout(9) code and the version I'm running on this
system - which I may put forward in a CP [1].

Is the order in which callouts that expire on the same tick
required to be well defined?

Is LIFO queuing of callouts allowed?

For instance if a function contains:
	callout_reset(&c1, n, f1, 0);
	callout_reset(&c2, n, f2, 0);
Is it valid for f2() to be called before f1()?

The current implementation guarantees this...

Also what if there is an intermediate timeout, eg:
void f1(void *a) { callout_reset(&c1, n, f3, 0); }
	callout_reset(&c1, n, f1, 0);
	callout_reset(&c2, n*2, f2, 0);
Can f3() be called before f2()?


[1] Has a smaller data footprint, shorter code paths and
is o(n.Log(time)), current code is o(n.time).
I've also removed the (semi)splurious dependency on NPROC.

David Laight: