On 23 Jan 2014, at 02:21, Derek Fawcus <[email protected]> wrote:
> One other thing that sprung to mind about the dual mapping was > with systems having virtual mapped caches. I've a vague memory > of issues with this sort of game on such systems. > > However, its probably moot given how most systems these days > have physically mapped caches. Virtually mapped caches make shared memory almost impossible, so they're very rare in architectures capable of running a POSIX system. If we encounter any that can run GNUstep, then we can add a memory barrier after creating the trampoline, which would fix it: The data is always written through one mapping and read through the other. This code is only used on platforms where there is some hand-written assembly for the trampolines, so every platform needs bringing up separately, which makes that quite easy to spot. We probably need to explicitly flush the i-cache on some platforms (e.g. MIPS) too. This is likely harder to debug, because we are currently not reallocating trampolines, so only need it if the previous trampoline has been recently used and has pulled the data for the following one into the i-cache. Unfortunately, there is no standard API for flushing instruction caches and so the call varies between operating systems. On Linux, it even varies between architectures... David -- Sent from my STANTEC-ZEBRA _______________________________________________ Discuss-gnustep mailing list [email protected] https://lists.gnu.org/mailman/listinfo/discuss-gnustep
