Date: Mon, 31 Aug 1998 12:37:51 +0200 (WET) From: Andris Pavenis To: Eli Zaretskii cc: djgpp AT delorie DOT com, "Alexander S. Aganichev" Subject: Re: uclock () In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 31 Aug 1998, Eli Zaretskii wrote: > > On Mon, 31 Aug 1998, Andris Pavenis wrote: > > > 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 think that's why `uclock' keeps reading the timer output until the > results are consistent. > It's enough to mess PIC up and the results will be wrong for next readings (up to rebooting or some other messing up will recync input) I have experience running TSR which reads channel 0 counter from PIC (measuring time when IRQ handler is invoked) and user program simultaneusly that does the reading PIC counter for other timing task (joystick). Failing to disable interrupts when reading timer causes further values read from PIC to be wrong. Andris