$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
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
no
> > 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
in
> no way designed for that. In my configuration for example, it depends on
CONFIG_SMP
> (the name differs between versions) and, since my kernel is configured
without SMP
> support, does not generate atomic instructions - so the resulting
application will
> 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?