I’ve just started reading UE4’s source code (for fun:)). and when I came across the FPlatformMisc::MemoryBarrier() and tried to trace into the implementations for each platform, I found this:
void FGenericPlatformMisc::MemoryBarrier()
{
}
Why? Am I missing any things? or MemoryBarrier is just not needed on Windows platform?
Each platform implementations have their version of these function, see e.g. Engine\Source\Runtime\Core\Public\Linux\LinuxPlatformMisc.h
As to why windows doesn’t have implementation of this. Hard to say, maybe it’s not needed on this platform due to some guarantees of windows platform that make this redundant.
Thank you very much for answering. Yes, I did find those implementations for OSX, Linux, etc.
I think I’ll try to figure out the answer about empty implementation for Windows by searching the MSDN.