This is the mail archive of the crossgcc@cygnus.com mailing list for the crossgcc project.


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

Atomic Operations (continuing on from Masking Interrupts?)


Hi all,

Thanks for the helpful suggestions. I have now implemented some in line 
assembly with constraints etc. as suggested to ensure atomic operations.

This started me thinking...(very dangerous!). 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.

Has anyone considered some sort of fix for this? Is it difficult? I would 
offer my time to look at the problem, however I have not written any 
compilers, nor modified any and even though I like a challenge I am not 
sure that the time it would take to get up to speed is available to me. 
excuses, excuses, excuses...

I would have thought that by specifying a variable to be 'volatile' then it 
should be assumed that it could change at anytime. Therefore an atomic 
operation should be used, if available on the micro concerned. Otherwise 
the variable could change during a read,modify, write sequence causing a 
conflict. Any thoughts on this?

David Williams
DLC Software P/L
davidwilliams@ozemail.com.au

_______________________________________________
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.

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