apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Roy T. Fielding" <field...@ebuilt.com>
Subject Re: Conditionals...
Date Fri, 03 Aug 2001 22:43:50 GMT
> Simply reading from a shared variable is not atomic. All accesses to a
> shared variable must be synchronized (or "serialized", if you prefer)
> with some form of mutual exclusion. (An example of this is on
> Solaris/Sparc, where a context switch can occur half-way through an update to
> a longword (or is it a word, I'm not sure).

Not all shared memory is created equal.  Simple variables that only have
one writer at a time by nature do not require additional locking.
That is how the old scoreboard worked.  Likewise, even a mid-update context
switch doesn't matter for a variable that is only incremented/decremented.

....Roy


Mime
View raw message