Date: Thu, 2 Sep 1999 15:02:45 -0400 (EDT) From: Luoqi Chen <luoqi@watermarkgroup.com> To: luoqi@watermarkgroup.com, marcel@scc.nl Cc: emulation@FreeBSD.ORG Subject: Re: Minor changes to USER_LDT related code Message-ID: <199909021902.PAA27772@lor.watermarkgroup.com>
next in thread | raw e-mail | index | archive | help
> Luoqi Chen wrote: > > > > 1) Don't make i386_get_ldt and i386_set_ldt static so they can be > > > used by the linuxulator. > > > 2) When ``option USER_LDT'' is not present, provide stubs for the > > > functions. These simply return ENOSYS. > > > 3) Add the proper prototypes to i386/include/sysarch.h > > > > > I am in favor of calling generic sysarch() interface instead, it should be > > the only API outside world knows about. And there will be no need to do > > any of the three items you listed above. > > Well, I don't like to redefine i386_get_ldt_args or i386_set_ldt_args in > the Linuxulator, so I think (3) should be done anyway. Furthermore, using > the sysarch() interface when USER_LDT is not defined will return EINVAL and > not ENOSYS. That's a bit inconvenient because I can't tell which EINVAL > should actually be ENOSYS. As a third remark, a kernel module is hardly > "outside world" :-) > I like your idea to merge i386_get_ldt_args and i386_set_ldt_args into one i386_ldt_args and make it public in sysarch.h. We probably also want to change sysarch and libc code to use it. With regard to the EINVAL return value, we could change it to EOPNOTSUPP and later map to ENOSYS in linuxulator. > Anyway, I see your point, but don't think the sysarch interface is what I > need. > Now do you think the sysarch() interface is still unusable? I feel strongly about externalize i386_get_ldt/i386_set_ldt, especially there is a standard API available and it takes very little effort to change the code to use it (5 more lines in your diff file). > -- > Marcel Moolenaar mailto:marcel@scc.nl > SCC Internetworking & Databases http://www.scc.nl/ > The FreeBSD project mailto:marcel@FreeBSD.org > -lq To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909021902.PAA27772>