www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/09/02/18:15:39

From: Endlisnis <s257m AT unb DOT ca>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: HW Interrupts
Date: Wed, 02 Sep 1998 18:32:39 -0300
Organization: NBTel Internet
Lines: 22
Message-ID: <35EDB977.44178FBF@unb.ca>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980902110533 DOT 517U-100000 AT is>
NNTP-Posting-Host: fctnts09c21.nbnet.nb.ca
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Eli Zaretskii wrote:
> > Also, the FAQ says that in practice it's impossible to lock all the
> > memory that an interrupt handler touches if it's written in C.  Is
> > this true?
> Of course, it's true!  One particularly nasty problem is that you
> cannot lock the stack from a C function, so automatic variables cannot
> be locked.  Locking the code of a C function is also hard (how do you
> know the size of the code of a function?).  A trick is widely used to
> work around this, but it isn't guaranteed to work with all versions of
> the compiler and with all possible combinations of optimization
> options.
	You could use 'static' variables instead of automatic ones.  Then you can
lock the data.  Also, you could set up your own stack.  Actually, why can't
you lock the stack?  Just find the address, and lock it?

-- 
     (\/) Endlisnis (\/)
          s257m AT unb DOT ca
          Endlisnis AT GeoCities DOT com
          Endlis AT nbnet DOT nb DOT ca


- Raw text -


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