Re: Handling NMI in a kernel module

Alan Robertson (alanr@unix.sh)
Sat, 27 Jul 2002 07:50:56 -0600


Alan Cox wrote:
> On Sat, 2002-07-27 at 04:30, Alan Robertson wrote:
>
>>Alan Cox wrote:
>>
>>>I've been tracking other lists. The current state is very much that we
>>>need the dual notifier. I now have some draft code that allows us to do
>>>this even on hardware that doesn't support it, and where the read()
>>>function gets told when an event is about to occur
>>>
>>I know what had been requested from the telco crowd was the ability to
>>register a function to get called (in the kernel) when an event was about to
>>occur.
>>
>
> They can already do that anyway. Its called add_timer() 8)

Given how vaguely I stated it, I guess that's what I deserve ;-)
However, it's not quite what I had in mind. ;-)

You'd like to see the driver add a timer when someone opens the device, and
removes and readds it each time they tickle the watchdog timer. It's this
interaction which the driver has to provide support for.

Also, you'd like to specify how long before the watchdog timer goes off that
it "pops".

So, you really want something like register_watchdog_pretimeout() and pass
it a function and a pretimeout time in ticks or milliseconds, or whatever.
You'd also need an unregister_watchdog_pretimeout() function of course as
well... IIRC, this is what I mentioned on the watchdog timer list.

-- Alan Robertson
alanr@unix.sh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/