This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Support MIPS II
- From: Richard Henderson <rth at redhat dot com>
- To: "H . J . Lu" <hjl at lucon dot org>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Thu, 25 Apr 2002 14:59:53 -0700
- Subject: Re: PATCH: Support MIPS II
- References: <20020425135116.A17257@lucon.org>
On Thu, Apr 25, 2002 at 01:51:16PM -0700, H . J . Lu wrote:
> +#ifndef _BITS_ATOMICITY_H
> +
> +#define _BITS_ATOMICITY_H 1
> +
> +static inline int
> +__attribute__ ((unused))
> +__exchange_and_add (volatile _Atomic_word *__mem, int __val)
> +{
> + int __result = *__mem;
> + *__mem += __val;
> + return __result;
> +}
At minimum this should have the same #warning that m68k has
about not actually being atomic.
And really this is incorrect for any operating system that
emulates ll/sc. Like Linux, and I suspect others.
r~