Messages in this thread | | | Date | Fri, 11 Jan 2008 20:37:46 -0500 | From | Chris Snook <> | Subject | Re: 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
| |