Dag-Erling Smorgrav <[EMAIL PROTECTED]> wrote:
>Alfred Perlstein <[EMAIL PROTECTED]> writes:
>> specifically how you say you increment it, then decrement it,
>> if you have multiple handlers where one can interupt another
>> you can have the counter get jumbled.
>
>Not if increment / decrement is atomic.
Which it _isn't_ in general. The only case where it _is_ atomic is on
a UP i386, where the compiler has generated an `inc' instruction
(which it might not).
Check out /sys/alpha/include/atomic.h or a recent (less than a week
old [1]) -current version of /sys/i386/include/atomic.h for atomic
code.
Peter
[1] It was broken prior to this.
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message