| delorie.com/archives/browse.cgi | search |
| Message-ID: | <06fd01c30e30$7670f840$0600000a@broadpark.no> |
| From: | "Gisle Vanem" <giva AT bgnett DOT no> |
| To: | <djgpp-workers AT delorie DOT com> |
| References: | <10304290440 DOT AA26174 AT clio DOT rice DOT edu> |
| Subject: | Re: uclock proposed patch |
| Date: | Tue, 29 Apr 2003 11:19:40 +0200 |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Mailer: | Microsoft Outlook Express 6.00.2800.1158 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V6.00.2800.1165 |
| Reply-To: | djgpp-workers AT delorie DOT com |
> + if(_os_trueversion == 0x532) { /* Windows NT, 2000, XP */
> + static double multiplier;
> + static unsigned long btics;
> + uclock_t rval;
> +
> + if (uclock_bss != __bss_count) {
> + signal(SIGILL, catch_rdtsc);
What happens with a previously installed SIGILL handler?
Should maybe save retval from signal() and restore it.
And what about the case where RDTSC is present but
disabled (CR4 bit 3 = 1). Maybe protect with a SIGSEGV
handler also.
-gv
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |