www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/31/04:11:35

Date: Mon, 31 Aug 1998 11:05:58 +0200 (WET)
From: Andris Pavenis <pavenis AT lanet DOT lv>
To: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
cc: djgpp AT delorie DOT com, "Alexander S. Aganichev" <asa AT lan DOT eed DOT miee DOT ru>
Subject: Re: uclock ()
In-Reply-To: <Pine.SUN.3.91.980830171349.20257U-100000@is>
Message-ID: <Pine.A32.3.91.980831104219.35380E-100000@ieva06.lanet.lv>
MIME-Version: 1.0


On Sun, 30 Aug 1998, Eli Zaretskii wrote:

> 
> On Thu, 27 Aug 1998, Andris Pavenis wrote:
> 
> > At first it is NECESSARY to disable interrupts when reading PIC 
> > counter.
> 
> Beware: disabling interrupts under some DPMI servers is *extremely*
> expensive, since some servers trap CLI/STI and the related DPMI call
> and emulate them with many-many CPU cycles.  This is not something I'd
> suggest to put in a function that needs to have minimum overhead
> (otherwise, its accuracy is destroyed).
> 

There is no other way if one does not want to introduce compatibility 
problems. If somebody else will try to read PIC timer counter at the same
time (one process is interrupted in the middle of reading and the second
is doing the same reading) PIC timer will be messed up. I don't think
we want this to happen.  

Andris

- Raw text -


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