[fpc-devel] A generic function for (multicore) cache flush?
jeppe at j-software.dk
Mon Oct 31 20:44:38 CET 2016
On 10/31/2016 07:33 PM, Nikolai Zhubr wrote:
> Hello all,
> Is there any good generic (portable) function to ensure memory cache
> flush for a thread on a multicore system?
> What I'm trying to do is essentially fetch some debugging counters
> from multiple threads. They might happen to run on separate cores,
> thus having something pending in local cache sometimes. I would like
> to avoid EnterCriticalSection/ LeaveCriticalSection as such blocking
> would be a huge overkill, however it is still desireable to fetch
> reasonably current values. I'd like to avoid doing manual assembly as
> well (for portability reasons etc.).
> Thanks a lot!
Have you found this to be a problem in real environments?
I can't imagine any of the mainstream processor architectures of FPC
where you wouldn't expect normal coherent bus operation when just
reading cached memory from other processors. If all you need is just
reasonably recent values that is..
More information about the fpc-devel