On Wed, Aug 25, 2004 at 03:29:20PM -0700, Oliver King-Smith wrote: > > Things are working much better. Both the driver and the main code work > without crashing now. > > > Others addressed your core problem, but you should know that this > > mmap request won't produce the desired result. You need MAP_SHARED > > since MAP_PRIVATE will result in a COW when you attempt to modify > > your register. > > I am not sure I understand why this needs to be MAP_SHARED (it sure does > though). Is there a good resource I can read to understand this a bit > better?
The mmap(2) manpage explains the difference pretty well. MAP_PRIVATE indicates that any modification are local to the process. So, as soon as you write to it, it makes a copy of the page for your process to modify. MAP_SHARED indicates that any modifications are seen by any processes that also map the region. googling will probably yield many threads on lkml on this topic. -Matt ** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
