I am using .Net 4.5 (preview ... 4 is suitable for the purpose of this question). I do threaded work.
Based on my research, I know that x86 processors have a strong memory model, which means that records will not be reordered. This allows you to safely release locks. This does not apply to Itanium processors that have a weak memory model.
I understand volatility, memory barriers, and the principles of reordering execution.
Ideally, I need to insert memory barriers at key points if , that is, an Itanium CPU, but not x86. Is it possible to do this dynamically since it has runtime compiler directives that are JIT processes?
If not, I understand that I will need to have separate assemblies for two platforms. In this case, what is the most elegant way to do this without having 2 sets of C # files, but just to change the purpose?
IamIC source share