public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Andi Kleen <ak@suse.de>,
	William Lee Irwin III <wli@holomorphy.com>,
	linux-arch@vger.kernel.org
Subject: Re: sem_is_locked()
Date: Wed, 22 Sep 2004 13:51:03 +0200	[thread overview]
Message-ID: <20040922115103.GB27432@wotan.suse.de> (raw)
In-Reply-To: <20040922123552.A2347@flint.arm.linux.org.uk>

On Wed, Sep 22, 2004 at 12:35:52PM +0100, Russell King wrote:
> On Wed, Sep 22, 2004 at 01:26:53PM +0200, Andi Kleen wrote:
> > On Wed, Sep 22, 2004 at 04:11:39AM -0700, William Lee Irwin III wrote:
> > > hch and some others (e.g. moi) trying to do vfs sweeps would very much
> > > like to have a sem_is_locked() to assist them; by any chance could arch
> > > maintainers help out with implementing this for various arches?
> > 
> > On x86-64/i386 and probably most other architectures it is just 
> > atomic_read(&sem->count) <= 0 
> 
> Obviously, generic code should not assume that a semaphore is
> implemented using atomic_t.

Sure, but with that fact it's pretty easy to implement the macro
wli wants for most architectures.

-Andi

  reply	other threads:[~2004-09-22 11:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-22 11:11 sem_is_locked() William Lee Irwin III
2004-09-22 11:14 ` sem_is_locked() Matthew Wilcox
2004-09-22 11:26 ` sem_is_locked() Andi Kleen
2004-09-22 11:35   ` sem_is_locked() Russell King
2004-09-22 11:51     ` Andi Kleen [this message]
2004-09-22 11:58       ` sem_is_locked() William Lee Irwin III

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=20040922115103.GB27432@wotan.suse.de \
    --to=ak@suse.de \
    --cc=linux-arch@vger.kernel.org \
    --cc=wli@holomorphy.com \
    /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