Atomic Operations (continuing on from Masking Interrupts?)
Tue Jul 6 10:48:00 GMT 1999
>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 email@example.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.
More information about the crossgcc