Mail Archives: djgpp/2001/08/31/12:13:44
> From: "Dykstra, Sean" <Sean_Dykstra AT maxtor DOT com>
> Date: Fri, 31 Aug 2001 09:06:50 -0600
>
> I am only hooking the protected mode interrupt. There is some old lock code
> below, but I planning on removing it as I now lock the entire app into
> memory (I have already removed the lock code for locking the vars...But I
> wanted to send you the file unedited from what I am running now).
One thing your code does not do is lock the stack. However, each
interrupt handler has a local automatic variable Count which is on the
stack. So your handlers access unlocked data.
Solution: either lock everything, or make those variable static and
lock them.
> I have
> found it to lock up on several machines so far, I will attempt to
> characterize them for BIOS, manufacturer, etc.. The interrupt frequency is
> about 1 interrupt every 40us - 70us.
This is a very high frequency. You might be hitting problems with
wrapper code being non-reentrant.
> One of the other reasons for
> using C code is that I call back into the app (another reason I suspect the
> stack might be corrupted).
This is yet another reason that might cause a failure: the callback
code and data is probably not locked, and could potentially run for a
long time.
> Can I still do this if I write the handler assembly?
Sure, assembly functions can call C functions.
- Raw text -