From: Pete Zaitcev <zaitcev@redhat.com>
To: James Roper <u3205097@anu.edu.au>, linux-kernel@vger.kernel.org
Subject: Re: Kernel semaphores
Date: Tue, 14 Sep 2004 09:05:12 -0700 [thread overview]
Message-ID: <20040914090512.7236a6da@lembas.zaitcev.lan> (raw)
In-Reply-To: <mailman.1095139743.24686.linux-kernel2news@redhat.com>
On Tue, 14 Sep 2004 15:25:24 +1000
James Roper <u3205097@anu.edu.au> wrote:
> [] So my question is, if my semaphore is
> causing that error, what possible things could be triggering it? Could it be
> an interrupt while waiting to acquire the semaphore? I'm using the
> down_interruptible() to acquire and up() to release.
You have to use spinlocks to provide a mutual exclusion to interrupts.
However, a process on CPU cannot sleep while holding a spinlock. So,
sometimes it's needed to create a derivative locking scheme, based
on spinlocks. A common trick is to combine semaphores and spinlocks.
I cannot be more specific without knowing your code.
-- Pete
next parent reply other threads:[~2004-09-14 16:13 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1095139743.24686.linux-kernel2news@redhat.com>
2004-09-14 16:05 ` Pete Zaitcev [this message]
2004-09-14 17:03 ` Richard B. Johnson
2004-09-14 5:25 James Roper
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=20040914090512.7236a6da@lembas.zaitcev.lan \
--to=zaitcev@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=u3205097@anu.edu.au \
/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
all inboxes | Powered by JetHome®