www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/07/13:10:20

Xref: news2.mv.net comp.os.msdos.djgpp:6736
From: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: setitimer() resolution is 18.2 Hz?
Date: Wed, 31 Jul 1996 09:29:24 CDT
Organization: Rice University, Houston, Texas
Lines: 19
Message-ID: <31ff6dc4.sandmann@clio.rice.edu>
References: <31FD390A DOT 41C67EA6 AT cybernet DOT com>
Reply-To: sandmann AT clio DOT rice DOT edu
NNTP-Posting-Host: clio.rice.edu
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

> DJGPP is limiting me to a timer callback rate of 18.2 Hz (9.1 with the
> standard SIGTIMR callback routine timer_action(), 18.2 with my own).

You should get 18.2 max, yes.  The 9.1 is probably a bug, since I did
almost no testing at all of this when I wrote it.  What's in there now
is proof of concept code that I never had a chance to finish ...

> Is there a way to make it faster that is accepted?

Yes, but you are entering the development zone :-)  The PM int 8 handler
in exceptn.s needs to be able to handle chaining/IRET'ing with a counter.
I think that codes there but never tested (you have to set a bit in
the hw_int_flags and set __djgpp_timer_countdown, it may also need some
modifications).  Then reprogram the PIT, use the right mode to keep 
uclock happy if you use it at the same time.  My original plan was to
automatically reprogram the PIC for the higher rate when profiling or
needing higher resolution timers - I like a factor of 11 since it gives
you around a 200Hz clock, which works well for lots of things.  Faster
will crater some slow machines.

- Raw text -


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