Atomic Operations (continuing on from Masking Interrupts?)

Ken Rose rose@netcom.com
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,
though.

 - Ken Rose
_______________________________________________
New CrossGCC FAQ: http://www.objsw.com/CrossGCC
_______________________________________________
To remove yourself from the crossgcc list, send
mail to crossgcc-request@cygnus.com with the
text 'unsubscribe' (without the quotes) in the
body of the message.


More information about the crossgcc mailing list