Date: Tue, 11 Jul 2000 22:12:36 -0700 From: Jason R Thorpe <thorpej@zembu.com> To: Thomas Klausner <wiz@netbsd.org> Cc: freebsd-arch@freebsd.org, freebsd-hackers@freebsd.org, tech-kern@netbsd.org Subject: Re: minherit(2) API Message-ID: <20000711221235.W11576@dr-evil.shagadelic.org> In-Reply-To: <20000709150924.N23637@danbala.tuwien.ac.at>; from wiz@netbsd.org on Sun, Jul 09, 2000 at 03:09:24PM %2B0200 References: <20000709150924.N23637@danbala.tuwien.ac.at>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Jul 09, 2000 at 03:09:24PM +0200, Thomas Klausner wrote: > The user API for minherit(2) is broken on all three of > {Free,Net,Open}BSD, but broken differently (for details see end of > this mail). We would like to see a common fix that allows minherit to > be used portably across the three systems. > > The API we propose: > > synopsis for minherit: > > #include <sys/mman.h> > > int minherit(void *addr, size_t len, int inherit); > > constants for inherit parameter defined in sys/mman.h: > > #define MAP_INHERIT_SHARE 0 /* share with child */ > #define MAP_INHERIT_COPY 1 /* copy into child */ > #define MAP_INHERIT_NONE 2 /* absent from child */ > > possibly including the following: > > #define MAP_INHERIT_DONATE_COPY 3 /* copy and delete */ > #define MAP_INHERIT_DEFAULT MAP_INHERIT_COPY > > (donate copy is not present in FreeBSD, default is not documented in > the man pages of any of the three). DONATE_COPY is not implemented in UVM. I'm not sure it was ever implemented anywhere. "Copy and delete" is really "move", right? Anyway, it's not clear those semantics are really useful at all. > That this change is not backwards compatible is of little concern, > since it is currently broken anyway. Besides, a C program can check > for the definition of the MAP_INHERIT_ constants after including > sys/mman.h and include conditional workarounds for the current APIs. It can certainly be made ABI-compatible. -- -- Jason R. Thorpe <thorpej@zembu.com> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000711221235.W11576>