lkml.org 
[lkml]   [2008]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Usage semantics of atomic_set ( )
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


\
 
 \ /
  Last update: 2008-01-12 02:41    [W:0.036 / U:0.456 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site