delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/10/17:26:23

From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Getting cr2 in exception handler
Date: Wed, 10 Mar 1999 16:00:41 CST
Organization: Rice University, Houston, Texas
Lines: 15
Message-ID: <36e6eb89.sandmann@clio.rice.edu>
References: <36E1D56E DOT ABB127DE AT cartsys DOT com> <36e3eacd DOT sandmann AT clio DOT rice DOT edu> <36E47DA4 DOT D9E2374B AT cartsys DOT com>
NNTP-Posting-Host: clio.rice.edu
X-NewsEditor: ED-1.5.9
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

> Actually, I realized another problem with such an approach.  If I get it
> from anywhere besides the exception handler stack (as not supported by
> CWSDPMI), another page fault may have occurred since then, i.e. in
> swapping in my signal handler.  

Correct, and I'm not sure that CWSDPMI itself doesn't clear CR2.  But 
I have thought about this problem before many years ago, and I think a
path was left to get there.  For example, you might have to replace the
DJGPP exception handler for page faults with one of your own (which was
already ring 0), and lock that handler - which would probably be good enough.

> It shouldn't be all that dangerous to run in ring 0 anyway. 

Some features like timers and CTRL-C/break don't work, and actually 
generate some ugly behavior - so be careful :-)

- Raw text -


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