public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Snook <csnook@redhat.com>
To: Vineet Gupta <vineetg76@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Usage semantics of atomic_set ( )
Date: Fri, 11 Jan 2008 20:37:46 -0500	[thread overview]
Message-ID: <478819EA.2080905@redhat.com> (raw)
In-Reply-To: <9f4f8abe0801111457t7535069ar1f98cc37d5cf8d40@mail.gmail.com>

Vineet Gupta wrote:
> I'm trying to implement atomic ops for a CPU which has no inherent
> support for Read-Modify-Write Ops. Instead of using a global spin lock
> which protects all the atomic APIs, I want to use a spin lock per
> instance of atomic_t.

What operations are you using to implement spinlocks?

A few architectures use arrays of spinlocks to implement atomic_t.  I believe 
sparc and parisc are among them.  Assuming your spinlock implementation is sound 
and efficient, the same technique should work for you.

	-- Chris

  parent reply	other threads:[~2008-01-12  1:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-11 22:57 Usage semantics of atomic_set ( ) Vineet Gupta
2008-01-11 23:16 ` Roland Dreier
2008-01-12  1:37 ` Chris Snook [this message]
2008-01-12 18:36   ` Vineet Gupta

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=478819EA.2080905@redhat.com \
    --to=csnook@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vineetg76@gmail.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