9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Christopher Pane cpane@metamorsw.com
Subject: [9fans] Hooking up to a timer in a driver
Date: Tue, 22 Jun 1999 02:17:52 +0000	[thread overview]
Message-ID: <19990622021752.LUStkY15dWTrW5UNutpHu0N-t-6-Q1j9t9rD-IhH4JQ@z> (raw)

Hi,

This is an update.

I have been hacking into how the pc kernal setups up the 8253 PIT.

It looks like if you want to get interrupted you insert a call to your
clock routine inside the clock() function in pc/clock.c.

Here is what is there now -

static void
clock(Ureg *ur, void *arg)
{
    Proc *p;
    int nrun = 0;

    USED(arg);

    m->ticks++;

    checkalarms();
    uartclock();
    hardclock();

/* And more clock stuff */

}

Is it correct to assume that if I want a clock interrupt I can  add a
midiclock() function , like the uartclock() and mouseclock() functions
that will get called every time clock is called by the timer, thus
giving me a way to sample the output queue for my file system, and
decide if is time to send the data to the MIDI port?

Am I way off here, I am kind exploring how to do this by reverse
engineering what is going on in the code !!!


Thanks


-Chris Pane







             reply	other threads:[~1999-06-22  2:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-22  2:17 Christopher [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-06-22  3:20 jmk
1999-06-21 18:05 Chris
1999-06-21 17:51 Chris

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990622021752.LUStkY15dWTrW5UNutpHu0N-t-6-Q1j9t9rD-IhH4JQ@z \
    --to=9fans@9fans.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).