delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2003/04/29/11:43:45

From: sandmann AT clio DOT rice DOT edu (Charles Sandmann)
Message-Id: <10304291546.AA25381@clio.rice.edu>
Subject: Re: uclock proposed patch
To: djgpp-workers AT delorie DOT com
Date: Tue, 29 Apr 2003 10:46:16 -0500 (CDT)
In-Reply-To: <06fd01c30e30$7670f840$0600000a@broadpark.no> from "Gisle Vanem" at Apr 29, 2003 11:19:40 AM
X-Mailer: ELM [version 2.5 PL2]
Mime-Version: 1.0
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> What happens with a previously installed SIGILL handler?
> Should maybe save retval from signal() and restore it.

I've thought about it and decided I'll only protect the 
first call, and if it is OK then I'll remove the handler.

If it's not OK, then we will just alway use the clock 
tic (or the buggy PIT timer).

> And what about the case where RDTSC is present but
> disabled (CR4 bit 3 = 1). Maybe protect with a SIGSEGV
> handler also.

I think this still raises a illegal instruction exception,
but someone with a more recent Intel handbook might be able
to say for sure.

In any case, this code is only called under Windows NT, 2K, XP,
and it's kernel doesn't set CR4 that way.

- Raw text -


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