From: milton@krutt.org (Milton Krutt)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Delaying an interrupt handler
Date: Mon, 23 Mar 2015 05:18:45 -0700 [thread overview]
Message-ID: <20150323121844.GA4484@debian> (raw)
Hi.
It is known that no semaphore synchronization should be
used inside an interrupt handler.
Anyway, I am looking at a freeBSD device driver (written by
a profesionist) and there are semaphores inside an interrupt
handler's subroutine.
Since I should port to linux that driver, I ask you how can I
reach such synchronization under linux; I tried to use semaphores
inside my handler but I got complains, and I don't want to break
the law, so no semaphores for me.
The scenario is the following:
firmware downloader {
while(fw_blocks--){
/* the call below will cause an interrupt */
load_block();
/* sleep unitl the int handler ackn's the previous
operation, and prevent ANY int. handler operations
until the process goes actually to sleep through the
following call */
sleep(); }
}
int handler {
if(the process is NOT asleep)
wait();
wake up the process.
}
NOTE: I am on a 2.6.10 in order to be closely tutored by LDD3.
next reply other threads:[~2015-03-23 12:18 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-23 12:18 Milton Krutt [this message]
2015-03-23 12:46 ` Delaying an interrupt handler Daniel Baluta
2015-03-23 13:46 ` Milton Krutt
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=20150323121844.GA4484@debian \
--to=milton@krutt.org \
--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 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).