From owner-freebsd-current Thu Jul 8 18:26:55 1999 Delivered-To: freebsd-current@freebsd.org Received: from ftp.dns.ne.jp (ftp.dns.ne.jp [210.155.3.5]) by hub.freebsd.org (Postfix) with ESMTP id 6D07B14E02; Thu, 8 Jul 1999 18:26:45 -0700 (PDT) (envelope-from tanimura@sakuramail.com) Received: from silver.carrots (yksk0124.ppp.infoweb.ne.jp [210.131.91.88]) by ftp.dns.ne.jp (8.9.2/8.8.5) with ESMTP id KAA16514; Fri, 9 Jul 1999 10:26:41 +0900 (JST) Received: from localhost (localhost [127.0.0.1]) by silver.carrots (8.9.3+3.2W/3.7W) with ESMTP id KAA70669; Fri, 9 Jul 1999 10:26:15 +0900 (JST) To: julian@whistle.com Cc: dfr@nlsystems.com, tanimura@naklab.dnj.ynu.ac.jp, freebsd-hackers@freebsd.org, freebsd-current@freebsd.org Cc: Seigo Tanimura Subject: Re: Rewriting pca(4) using finetimer(9) (was: Re: MPU401 now works under New Midi Driver Framework with a Fine Timer) From: Seigo Tanimura In-Reply-To: Your message of "Thu, 8 Jul 1999 11:23:42 -0700 (PDT)" References: X-Mailer: Mew version 1.93 on Emacs 19.34 / Mule 2.3 (SUETSUMUHANA) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <19990709102615A.tanimura@sakuramail.com> Date: Fri, 09 Jul 1999 10:26:15 +0900 X-Dispatcher: imput version 980905(IM100) Lines: 32 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG From: Julian Elischer Subject: Re: Rewriting pca(4) using finetimer(9) (was: Re: MPU401 now works under New Midi Driver Framework with a Fine Timer) Date: Thu, 8 Jul 1999 11:23:42 -0700 (PDT) Message-ID: julian> this is problematic. julian> you cannot add a new element before the pending firing because you can't julian> tell how far into the present trigger you are. The workaround below would help it. The time elapsed since the last aquire_timer0() can be determined by latching the timer counter. From: Seigo Tanimura Subject: Re: Rewriting pca(4) using finetimer(9) (was: Re: MPU401 now worksunder New Midi Driver Framework with a Fine Timer) Date: Thu, 08 Jul 1999 18:40:23 +0900 Message-ID: <199907080940.SAA26649@rina.naklab.dnj.ynu.ac.jp> tanimura> > t' > \sum_(k=0)^(j) dt_rem(c_k) tanimura> > tanimura> > where the right hand side of the inequality is the time span after which tanimura> > the callout c_k is made. Then c' is inserted after c_j and new dt_rem(c_(j+1)) tanimura> > and dt_rem(c_(j+2)) are determined. Now we can acquire_timer0() with dt_rem(c_0). tanimura> tanimura> If t' is less than dt_rem(c_0) then we have no feasible j. This is the case tanimura> in which we must reaquire_timer0() using t'. Then, after interting c', dt_rem(c_1) tanimura> is updated to be (dt_rem(c_1) - (time elapsed since the last aquire_timer0())), tanimura> so that c_1 can be armed later. Seigo Tanimura To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message