All of lore.kernel.org
 help / color / mirror / Atom feed
From: mandeepsandhu.chd@gmail.com (Mandeep Sandhu)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Putting artificial delays in a char driver
Date: Fri, 20 May 2011 12:13:42 +0530	[thread overview]
Message-ID: <BANLkTim2qBb1ECSCzf50NcEZ5wwEyTq7zw@mail.gmail.com> (raw)
In-Reply-To: <201105191430.19320.jocke@holstenhof.se>

> Regarding bottom/top halves, modern 2.6 kernels have so called threaded
> interrupts. This basically means that when an IRQ is triggered, the ISR is
> already executing in a thread. So, if you use threaded IRQ's you don't quite
> have to worry about bottom/top halves of old. ?You can even use mutexes (not
> spinlocks) in the ISR. I believe that the threaded interrupts will generate
> some small delay before the ISR is executed, but if memory serves me right
> it's basically too small to matter in the most cases.

Thanks for pointing this out. Didn't we now have threader IRQs! Nice.

> I think that the solution described by Felix Varghese, is a quite good
> solution. By triggering the timer in the ISR function, it will be lit
> constantly if there is very much IR communications going on.

True. Using timers now. It's quite simple to use and looks
clean...plus my fxn that toggles the LED states are quite simple/basic
and have no resource locking requirements so no worries of race cond's
too.

Thanks,
-mandeep

>
> BRs,
> /Jocke!
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>

      reply	other threads:[~2011-05-20  6:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-19 11:30 Putting artificial delays in a char driver Mandeep Sandhu
2011-05-19 11:51 ` Felix Varghese
2011-05-20  6:40   ` Mandeep Sandhu
2011-05-19 12:30 ` Joachim Holst
2011-05-20  6:43   ` Mandeep Sandhu [this message]

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=BANLkTim2qBb1ECSCzf50NcEZ5wwEyTq7zw@mail.gmail.com \
    --to=mandeepsandhu.chd@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.