Messages in this thread | | | Date | Sat, 12 Jan 2008 10:36:57 -0800 | From | "Vineet Gupta" <> | Subject | Re: Usage semantics of atomic_set ( ) |
| |
> What operations are you using to implement spinlocks?
The cpu provides atomic exchange instruction (atomic Read/write semantics) which forms the back end of spin lock code. __raw_spin_trylock( ) atomically swaps the lock memory with a reg (set to 1)
Using a pool of spinlocks rather that original idea of spinlock per atomic_t anyways seems to be a better idea. I really appreciate the responses. Thanks a lot
-Vineet
| |