Re: LiS in user space

Steve Schefter <[email protected]> Mon, 16 Oct 2006 14:37:23 -0400
Newsgroups gmane.linux.kernel.streams
Message-ID <[email protected]>
Hi Stefano.

I haven't used LiS in user space very much, but:

 > I have some questions about that:
 > - Is it possible (and safe) to use this laboratory version of LiS to
 >   compile a target application that runs in user-space?
 > - how should I compile my modules together with user-space streams.o?
 >   is it enough to link them together in my final executable?

For user-space, the LiS functions are in libc/libLiSuser.a (and .so)
rather than in a streams.o.  You just need to link your app with that
library.

The only testing I've done with this setup was with a standard
test application which comes with LiS, strtst.  That passed all
tests (LiS-2.19.0, but I don't expect 2.18 to be any different).

 > - is it possible (and how) to exchange data between a streams module
 >   compiled in user space and a non-streams driver in kernel space?

You'd have to make up your own function to make the jump from user
space to kernel space (eg, by ioctl in your module's wput routine)
but this would not be directly related to the streams environment.
You might want to look at loop.c as a basis for your module.

If you want to end up in kernel space, is there a reason why you
want to run streams in user space?

Regards,
     Steve

------------------------------------------------------------------------
Steve Schefter                               phone: +1 705 725 9999 x26
The Software Group Limited                     fax: +1 705 725 9666
642 Welham Road,                             email: [email protected]
Barrie, Ontario CANADA  L4N 9A1                Web: www.wanware.com