Nicolas Williams wrote: > On Mon, Mar 31, 2008 at 01:37:42PM +0200, Roland Mainz wrote: > > Rod Evans wrote: > > > mmapfd(int fd, uint_t flags, mmapfd_result_t *storage, > > > uint_t *elements, void *arg) > > > > Uhm... how do I unmap the mapping done by |mmapfd()| ? > > I thought that was clear (each mmapfd_result_t's mr_addr can be used as > an argument to munmap(), mprotect(), ...).
Erm... I appears I missed this when I was looking at 3AM on the manual page... sorry... ;-( > > > uint_t mr_flags; /* info on the mapping */ > > > > Please change this to |uint64_t| (e.g. it may be nice to have more flags > > available by default). > > Same thing with the flags argument, no? Erm... depends... I wasn't sure what may happen when this happens on a 32bit ABI... > > > } mmapfd_result_t; > > > > > > Values for mr_flags include: > > > > > > MFD_ELF_HDR 0x1 /* the ELF header is mapped at mr_addr */ > > > MFD_AOUT_HDR 0x2 /* the AOUT header is mapped at mr_addr > > > */ > > > > What about reserving the first four bits for |MFD_*_HDR| flags > > (|MFD_ELF_HDR|, |MFD_AOUT_HDR| and two bits reserved for future > > |MFD_*_HDR| flags) ? > > Why? Isn't the ARC going to be the authority for this namespace > anyways? Right (originally I was thinking (at 3am, sleep-deprivated and without any coffee) about aesthetic (anyone remember the X11 toolkits and their wild mix of flag lists which grew over time ?) and other platforms which may include this system call in the future but this was another half-backed thought since "binary interoperabilty" is not needed in this case and ARC is the authority... :-) ) ... > My interpretation is that all currently unused flag bits are > reserved. Or did you mean that file format shouldn't be a flag but an > integer value? My idea was to pack similar flags together, mainly for aesthetic reasons (and maybe easier debuging since all *_HDR flags would sit in one nibble/byte) ... ---- Bye, Roland -- __ . . __ (o.\ \/ /.o) roland.mainz at nrubsig.org \__\/\/__/ MPEG specialist, C&&JAVA&&Sun&&Unix programmer /O /==\ O\ TEL +49 641 7950090 (;O/ \/ \O;)
