[comp.sys.m68k] System V/68 device driver timers

fenske@dfsun1.electro.swri.edu (Robert Fenske Jr) (06/27/90)

	Anyone know about Motorola System V/68 device driver
kernel timer routines?  I'm trying to develop a device driver for
some hardware we have.  Inside the driver I want to time out
some events if they don't occur.  As far as I can tell I
am calling the timeout() and untimeout() routines correctly,
yet eventually I get a system panic with timeout table
overflow.  As though the untimeout routine isn't releasing
the timer as it should.  I'm making the calls like this:

<index> = timeout(<my timeout routine>,<minor dev #>,<timeout value>);

	untimeout(<index>);

I call untimeout() if the event occurs or when the timeout does
occur (this is a just-in-case).

I'm running System V/68 Release 3 Version 5.1 on a MVME147A-1.
I'd like to know if I'm handling the timer correctly, and if not
what am I not doing right/lacking.


-- 
Robert Fenske, Jr.                      Sw     | The Taming the C*sm*s series:
Electromagnetics Division              /R---\  |
Southwest Research Institute          | I    | | "The Martian canals were the
dfsun1.electro.swri.edu 129.162.160.4  \----/  |  Martians' last ditch effort."

heiby@mcdchg.chg.mcd.mot.com (Ron Heiby) (06/28/90)

fenske@dfsun1.electro.swri.edu (Robert Fenske Jr) writes:

>I call untimeout() if the event occurs or when the timeout does
>occur (this is a just-in-case).

I haven't traced through the timeout/untimeout/clock code in detail,
but it looks to me like you don't want to be calling untimeout() on
timeout ids that have already happened.  You might take a look at
a crash dump and see what is in your callout table at the time of
the panic.  That might tell you something interesting.
-- 
Ron Heiby, heiby@chg.mcd.mot.com	Moderator: comp.newprod
"Mandatory Drug Testing?  Just Say NO!!!"