From: Endlisnis 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: NNTP-Posting-Host: fctnts09c21.nbnet.nb.ca Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk 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