[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

extension for addtimeout()

The current addtimeout() lacks the possibility to specify
a process to which the timeout should be attached.

This is a problem, because all of a process' timeouts are
deleted when the process exits. So the timeout function
is not executed if the process exits before the timeout

This is bad news, since in MiNT-Net the IP protocol will
be implemented as a kernel hook (ie no seperate process).
When a packet arrives over the Network, an interrupt
routine should add a timeout to MiNT (to ensure the
timeout function is really executed) for the main IP
function, which then processes the packet.

This makes it also necessary to make the timeout stuff
interrupt prove.

I suggest a new function, which should be available over
struct *kerinfo for device drivers:

*addproctimeout (long delta, void (*f) (PROC *), short pid);

which adds a timeout function `f' to be called in `delta'
milliseconds to process `pid'. addtimeout() would then be
a special case of addproctimeout().

This is only a first idea, any suggestions are welcome.
What do you think about it, Eric ?