This is the mail archive of the
mailing list for the crossgcc project.
Re: Atomic Operations (continuing on from Masking Interrupts?)
- To: email@example.com
- Subject: Re: Atomic Operations (continuing on from Masking Interrupts?)
- From: Ken Rose <firstname.lastname@example.org>
- Date: Tue, 6 Jul 1999 08:56:49 -0700 (PDT)
- Reply-To: email@example.com
>Some responses indicated that others have experienced this 'problem' before.
>As GCC and support for M68K have been around for quite some time I assume
>that a 'fix' in the compiler is probably difficult.
Part of the problem is that the language semantics can get in the way. For
instance, if you do
foo = *ptr++;
You're insisting that the compiler load (for the assignment), and then do
the increment. It probably figures that since the value's already in a
register, it should go ahead and increment it there, rather than using
an in-place instruction. So, there probably isn't any sensible way for the
compiler (any compiler) to do what you want. You can do some things in
your source code to make it easier for the compiler to do what you want,
- Ken Rose
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
To remove yourself from the crossgcc list, send
mail to firstname.lastname@example.org with the
text 'unsubscribe' (without the quotes) in the
body of the message.