Linux PARISC architecture development
 help / color / mirror / Atom feed
From: Grant Grundler <grundler@dsl2.external.hp.com>
To: Matthew Wilcox <willy@debian.org>
Cc: parisc-linux@parisc-linux.org
Subject: Re: [parisc-linux] atomic_t
Date: Mon, 14 Jan 2002 00:12:32 -0700	[thread overview]
Message-ID: <20020114071232.07537482A@dsl2.external.hp.com> (raw)
In-Reply-To: Message from Matthew Wilcox <willy@debian.org> of "Mon, 14 Jan 2002 04:43:37 GMT." <20020114044337.B9193@parcelfarce.linux.theplanet.co.uk>

Matthew Wilcox wrote:
> Not on PA... look at <asm/atomic.h>.  There's only 3 primitives, all
> other atomic ops are defined in terms of those.

Ah ok - you are right. atomic_read() doesn't use the lock and
that only leaves the other two.

> > But someone thought it was time to reset the counter. And if
> > it "never happened", then whoever is looking for 'v == 1' will
> > never see it.
> 
> It's a race though; they can't guarantee to see it anyway.

hmmm...Most people write code with the intent of seeing *some*
event (eg v < 0).  Ie, if it didn't matter, then we don't need
the code.  I'd like to believe folks are usually more careful
than that.  I need to think about this some more though.

grant

  reply	other threads:[~2002-01-14  7:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-13 21:15 [parisc-linux] atomic_t Matthew Wilcox
2002-01-14  4:09 ` Grant Grundler
2002-01-14  4:43   ` Matthew Wilcox
2002-01-14  7:12     ` Grant Grundler [this message]
2002-01-14  9:54   ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2002-01-14  6:54 John Marvin

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=20020114071232.07537482A@dsl2.external.hp.com \
    --to=grundler@dsl2.external.hp.com \
    --cc=parisc-linux@parisc-linux.org \
    --cc=willy@debian.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