Discussion:
LiS in user space
Longhi Stefano
2006-10-16 17:24:45 UTC
Permalink
Hello,

I am trying to compile some modules and drivers together with LiS-2.18
configured to run in user-space. Those drivers do not use directly the
hardware but communicate with a separate non-streams driver.
My aim is to obtain something that runs on a target environment.

I read in LiS documentation that it is possible to build a user-space
version of LiS that can be used for laboratory testing, but I could not
find any additional information about this functionality.
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?
- is it possible (and how) to exchange data between a streams module
compiled in user space and a non-streams driver in kernel space?
- are performances worst in this configuration?

Thanks in advance
Stefano
Steve Schefter
2006-10-16 18:37:23 UTC
Permalink
Hi Stefano.
Post by Longhi Stefano
- 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).
Post by Longhi Stefano
- 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: ***@wanware.com
Barrie, Ontario CANADA L4N 9A1 Web: www.wanware.com
Brian F. G. Bidulock
2006-10-16 20:28:48 UTC
Permalink
Stefano,

If you are going to end up in user space, you might consider the ACE C++
Adaptive Communications Environment, which is based on STREAMS, is very
mature, and runs on just about anything. See,

http://www.cs.wustl.edu/~schmidt/adaptive.html

--brian
Post by Longhi Stefano
Hello,
I am trying to compile some modules and drivers together
with LiS-2.18 configured to run in user-space. Those drivers do not
use directly the hardware but communicate with a separate
non-streams driver.
My aim is to obtain something that runs on a target environment.
I read in LiS documentation that it is possible to build a user-space
version of LiS that can be used for laboratory testing, but I could
not find any additional information about this functionality.
- 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?
- is it possible (and how) to exchange data between a streams module
compiled in user space and a non-streams driver in kernel space?
- are performances worst in this configuration?
Thanks in advance
Stefano
--
Brian F. G. Bidulock ¦ The reasonable man adapts himself to the ¦
***@openss7.org ¦ world; the unreasonable one persists in ¦
http://www.openss7.org/ ¦ trying to adapt the world to himself. ¦
¦ Therefore all progress depends on the ¦
¦ unreasonable man. -- George Bernard Shaw ¦
Loading...