Not entirely.
> It appears as though, on a SMP machine, shared memory is not the same
> page shared amongst tasks. It appears (emphasis upon appears) as though
> shared-memory is a copy of something that does not get updated properly
> after a write (like it's in one CPU's cache, but not in another). I
> think one has to invalidate the cache after a write to shared memory??
Your code is broken.
> #define cli __asm__ __volatile__("cli\n")
> #define sti __asm__ __volatile__("sti\n")
These only affect the local CPU
> while((key = pars->key++) == 0)
This isnt SMP safe
> pars->spin += key;
This isnt SMP safe etc..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/