Messages in this thread | | | Date | Thu, 30 Dec 1999 21:49:14 +0100 | From | Richard Zidlicky <> | Subject | Re: mmap bug in 2.2.13 (or in documentation) |
| |
On Wed, Dec 29, 1999 at 04:15:03PM +0100, Rik van Riel wrote: > On Wed, 29 Dec 1999, Jamie Lokier wrote: > > Abramo Bagnara wrote: > > > As I'm unable to understand why a file opened WR_ONLY cannot be mmap'ed > > > PROT_WRITE, MAP_SHARED I deduce that a break is missing at line 222. > > > > On some platforms (i386), PROT_WRITE is equivalent to PROT_READ | > > PROT_WRITE. The processor provides no mechanism for write-only access. > > And on others you can only address memory in word sizes, > whereas some languages (C, for example) mandate access > on the byte or even bit level. > > This means that you have to read a word first before you > can write a single byte, making the whole write-only > thing a pointless excercise.
I would not call it pointless, despite these limitations. I was doing something similar in an emulator to emulate HW registers. Turned out to be awfully complicated but I haven't yet given up ;-)
Bye Richard
- 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/
| |