Mail Archives: djgpp/1998/09/02/18:15:39
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 -