[Asterisk-Dev] Race issue in channel.c involving uniqueint on
Asterisk 1.2.1
Luigi Rizzo
rizzo at icir.org
Fri Jan 6 12:59:40 MST 2006
On Fri, Jan 06, 2006 at 01:28:40PM -0600, Kevin P. Fleming wrote:
> David Woodhouse wrote:
>
> > Well, there's asm/atomic.h which might compile on some architectures,
> > but it's likely to be broken. Do not make the mistake of using it -- if
> > it does compile, you may well get non-atomic behaviour from it.
>
> On the x86-type architectures at least, using it seems to be fine as
> long as you set CONFIG_SMP to guarantee the lock prefixes will be
> generated. I don't know about the other architectures, but we could
> certainly take it slowly and only enable the use of these operations on
> arches/kernel versions that are known good combinations.
good. i will try to provide patches for that using the inline
function derived from the FreeBSD implementation that i posted eariler.
kevin - can you also comment on http://bugs.digium.com/view.php?id=6146
because it is very related (refcount manipulations) and would be the
most interesting client for this type of change.
cheers
luigi
More information about the asterisk-dev
mailing list