This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Support MIPS II


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~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]