From: Peter Dimov (pdimov_at_[hidden])
Date: 2002-02-28 13:53:48
From: "Vadim Egorov" <egorovv_at_[hidden]>
> "Peter Dimov" <pdimov_at_[hidden]> writes:
> > From: "Steve M. Robbins" <steven.robbins_at_[hidden]>
> >> Hi,
> >> This file includes <asm/atomic.h>, apparently hoping to find the
> >> definition of ATOMIC_INIT(). This works on my i368 machine, but not
> >> on the Debian sparc or powerpc builders. Is it kernel version
> >> dependent? If so, in what version did it appear?
> > I don't know. I am not a Linux kernel expert by any means, and there is
> > definitive documentation that I know of. :-(
> > Another strong case for ./configure. (HAVE_ASM_ATOMIC_H.)
> IMHO, using <asm/atomic.h> in an application code is a bad thing - it was
> no way designed for that. In my configuration for example, it depends on
> (the name differs between versions) and, since my kernel is configured
> support, does not generate atomic instructions - so the resulting
> have a good chance to fail running on an SMP platform.
You are right, I haven't thought of that; the functions are inline. So what
can we do? Implement our own atomic.h for every platform? Or just use
pthreads and live with the performance hit?
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk