This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

C/C++ atomic operation on ARM9 and ARM Cortex-M4

I have a question about C/C++ atomic operation on ARM9 and ARM Cortex-M4. I am using ARMCC compiler with C / C++ languages. It interests me if it is possible that an interrupt will be handled in the middle of operations:

  • Read 8-bit character form structure which is not aligned (packed).  From internal memory.
  • Read 8-bit character form structure which is not aligned (packed).  From external memory.
  • Read 32-bit integer from external memory. The memory is connected to the processor by 16 (or 8) bits data line.
  • Read 64-bit long long integer from internal memory.
  • Read 64-bit long long integer from external memory.

Does anything change if you access to these objects indirectly by pointer or reference?

Are there any other basic operations potentially unsafe in multi-thread application?

Thanks for answers.