delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/12/15/16:04:37

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Wed, 15 Dec 2004 23:02:07 +0200
From: "Eli Zaretskii" <eliz AT gnu DOT org>
Sender: halo1 AT zahav DOT net DOT il
To: djgpp AT delorie DOT com
Message-ID: <01c4e2e9$Blat.v2.2.2$7ba22de0@zahav.net.il>
X-Mailer: emacs 21.3.50 (via feedmail 8 I) and Blat ver 2.2.2
In-reply-to: <20041215011234.44376f01.lijon@kymatica.com> (message from
Jonatan Liljedahl on Wed, 15 Dec 2004 01:12:34 -0200)
Subject: Re: Problems with timer interrupt chaining and SmartDrv
References: <20041215011234 DOT 44376f01 DOT lijon AT kymatica DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Date: Wed, 15 Dec 2004 01:12:34 -0200
> From: Jonatan Liljedahl <lijon AT kymatica DOT com>
> 
> Situation: I'm replacing the timer interrupt handler with my own
> protected mode handler. I'm also reprogramming the PIT chip to 600Hz
> frequency. I keep a counter so that I can call the original realmode
> handler at 18.2Hz interval.
> 
> Now, everything works fine if I do NOT have smartdrv installed. But if
> smartdrv is installed, the computer hangs when smartdrv is writing from
> cache to disc.

Does the problem go away if you hook the timer interrupt, but do not
reprogram the timer to a higher frequency?

> Is smartdrv a hopeless piece of bugs?

I doubt that.  SmartDRV is a good program, it's just that writing a
robust and efficient disk cache on DOS is not simple, especially if
you wish to call DOS file I/O functions from within the timer
interrupt.  So it needs to jump through the hoops to make everything
work.  It's possible that some of that juggling gets disrupted by the
DPMI environment, or interferes with it.

> If so, can I work around it somehow? I'd love to not have to write
> "You must disable smartdrv's write-cache or this program will hang
> your computer" in the manual!

If everything else fails, you can include in your program's
initialization routine code to disable SmartDRV automatically.  Ralf
Brown's Interrupt List documents the API exported by SmartDRV via
interrupt 2Fh.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019