1) One of the services that STREAMS provides for its drivers is the
ability (optionally) to call an init routine in the driver at boot
time. The SVR4 semantics of this call is that it occurs early enough in
the boot sequence that interrupts have not been enabled yet. That would
be too early for a loadable module to be loaded.
2) STREAMS is not stand-alone. What I mean by that is that a set of
STREAMS drivers are linked in with the STREAMS executive and that whole
libary is then linked into the kernel. There is a subsidiary build
procedure that involves interpreting a STREAMS-specific configuration
file that enumerates the STREAMS drivers and a number of attributes of
each driver. Each driver has its own Space.c file which must be
compiled in the presence of a STREAMS configuration generated config.h
so that the drivers can turn config info into C language table entries.
I suppose that this _could_ all lead to a master link of STREAMS and all
of its drivers as a loadable module, but, perhaps because of my UNIX
background, it feels more like a kernel link to me.
3) The SVR4 model for individual STREAMS drivers is that they come in
binary (not source) packages. Each driver contibutes some information
to the STREAMS configuration file and each gets its Space.c file
compiled with defines generated from the config file available to it.
In SVR4 all of these pieces get linked into the kernel. I have tried to
model that style.
4) SVR4.2 and Solaris do have a scheme for making individual STREAMS
drivers loadable modules, but I have not attempted to implement that
feature. In those cases the STREAMS executive itself is still linked
directly into the kernel (though I may be speaking out of turn for
Solaris).
I think all that really matters is to get some little stubs into the
kernel so that a STREAMS user can RPM the STREAMS code into their kernel
without having to patch any kernel source to do it. That way STREAMS
users are insulated from kernel source updates. With RPM one would not
need to know much to install STREAMS in the kernel.
> [to Alan Cox:]
> > If you would like, I could provide you with a small-ish patch file that
> > I think would cover the places in the kernel that I would like to see
> > changes in to lay the foundation for the easy addition of STREAMS.
>
> I think that's a good idea.
>
I have sent the "stubs" patch off to Alan Cox.
> -Andi