lkml.org 
[lkml]   [2004]   [Oct]   [20]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 20 Oct 2004 16:42:33 +0200
FromMartin Waitz <>
SubjectRe: Linux v2.6.9 and GPL Buyout
hoi :)

On Wed, Oct 20, 2004 at 12:18:25AM -0400, Lee Revell wrote:
> I was doing this with perl and SQL before I
> ever heard of RCU.  If you don't want to lock a table (or didn't realize
> SQL had such a thing as table locking :-) you just fetch a value, make
> some calculation on it, then do the update iff that value has not
> changed.  If it has changed you fetch the new value and go back to step

what you described is not RCU.
it's more something like seqlocks

RCU means: you always read without any locking.
when you want to write, you create a new copy of the data instead
and switch over a pointer when you are done.
if you are sure that the old pointer is not used any move, you can
free the old value.

-- 
Martin Waitz
[unhandled content-type:application/pgp-signature]
\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2008