Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 20 Jul 1999 07:16:10 +1000
From:      Peter Jeremy <jeremyp@gsmx07.alcatel.com.au>
To:        hackers@FreeBSD.ORG
Cc:        des@flood.ping.uio.no
Subject:   Re: Determining the return address
Message-ID:  <99Jul20.065759est.40325@border.alcanet.com.au>
In-Reply-To: <bulk.28154.19990719110922@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Dag-Erling Smorgrav <des@flood.ping.uio.no> wrote:
>Alfred Perlstein <bright@rush.net> 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Jul20.065759est.40325>