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


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