Date: Mon, 26 Mar 2001 21:31:31 +0200 From: Poul-Henning Kamp <phk@critter.freebsd.dk> To: John Baldwin <jhb@FreeBSD.org> Cc: Greg Lehey <grog@lemis.com>, leclercn@videotron.ca, freebsd-alpha@FreeBSD.org, Mike Smith <msmith@FreeBSD.org> Subject: Re: dev_t size mismatch kernel / userland Message-ID: <66685.985635091@critter> In-Reply-To: Your message of "Mon, 26 Mar 2001 10:57:55 -0800." <XFMail.010326105755.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <XFMail.010326105755.jhb@FreeBSD.org>, John Baldwin writes: >This will probably make Poul's head spin, but one idea might be to have a >kdev_t type. :-P In the kernel kdev_t == dev_t, and in userland, kdev_t is a >void *. This would work in this case I think because you never use the dev_t's >while in userland. I do like exporting trimmed down structures, however. >Please don't export mutexes while you are at it. :-P Guys, I'm net to this subject, so please fill me in: just what in the (kernel) dev_t do you want to export to userland ? Background: I retained the dev_t name in the kernel to avoid a massive scale source code incompatibility there. In userland dev_t is defined in all sorts of standards as an "arithmetic type", and code would break left right and center if it wasn't one, so I maintained the "minor/major" integer. To give access to the userland view of things in the kernel, the type "udev_t" was introduced, but to avoid polluting things I hid the definition of that type from userland. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-alpha" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?66685.985635091>