Subject: Re: USB emul under Linux
To: None <tech-kern@NetBSD.org>
From: J Chapman Flack <email@example.com>
Date: 01/19/2005 13:37:06
> I tried that. It doesn't work. Reason : usb.h refers some system calls
> that ... do not exist in the Linux libc.
That puts a question in my mind (just now, so I haven't looked closely to
answer it). I can imagine this kind of thing (build an interposing library
for apps running under emulation, that offers some access to native
extensions) coming up more than once. What would worry me even more than
usb.h referring to system calls that aren't in Linux, would be if it
referred to system calls that *are* in Linux but with different semantics,
enum values, etc. You're compiling NetBSD code that passes NetBSD constants
and expects NetBSD semantics, but if linked into a emul executable those
values may be translated by the emulation layer. woops...
So my question is, does the emulation layer provide any kind of escape
mechanism - say one new syscall available under emulation that allows
an interposed user library to say "Hi, I know I'm really running on NetBSD
under emulation, and please invoke NetBSD syscall 142 with the following
maybe it wouldn't be useful enough to be worth the effort ... I'm just
curious whether such an escape exists already.