[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-rt
Subject:    RE: [rtl] Compilation errors: functions not available inside the
From:       Carlos Parada <carlos-f-parada () ptinovacao ! pt>
Date:       2002-02-25 13:21:55
[Download RAW message or body]


> On Thursday 21 February 2002 05:55 am, you wrote:
> > Hi,
> >
> > I'm having problems compiling RTLinux modules, when I use some
> functions.
> > I have no problems when just use typical rtl functions, like related to
> > threads, timers, etc. However, when I try to use other functions, like
> for
> > example 'socket' (including sys/socket.h) it does not compile and give
> me
> > some errors in the included .h files.
> > I've tried to remove all references to the rtl in the code and remove in
> > the Makefile the 'include rtl.mk' file, and all functions compile with
> no
> > problems.
> >
> Hi Carlos,
> 
> I believe the reason for your problem is simple: you cannot use most of
> the 
> "normal" C library or system calls within RTLinux, because you are within
> the 
> kernel, and not in user space. This is a topic that comes up periodically,
> 
> and there are ways to bring in functions you need, but only some of them. 
> 
> If you go to the linux source tree and type "make psdocs" or "make
> pdfdocs" 
> in the Documentation directory, you should end up with a bunch of
> docbooks, 
> including kernel-api.pdf. This will give you (very short) manpages for the
> 
> functions available within the kernel.
> 
> More generally, you need to do only the absolute minimum of work inside
> the 
> kernel, and let your user-space code do as much work as possible. You 
> transfer data to user-space via fifos or shared memory.
> 
> Good luck,
> 
> Pablo Alvarez
> 
	[Carlos Parada]  

	The use of fifos and shared memory is not, probably, the best for
me, because I'm using RTLinux for measurements purposes, to exactly know the
moment in which I sent and receive a packet. If I use this mechanism I lose
the precision.
	If the only solution is to use the kernel API to access to
networking services, I'll take it. However, its very strange to me, see that
the RTLinux documentation refers this function in the documentation in:

	/usr/src/rtlinux/usr/linux/doc/html/susv2/index.html
		/usr/src/rtlinux/usr/linux/doc/html/susv2/xnsix.html
/usr/src/rtlinux/usr/linux/doc/html/susv2/xns/socket.html 

	It seems that the functions related to networking services are
allowed in RT modules.

	Anybody knows why this documentation is there and if this means that
some networking services are allowed (eventually doing something more in my
code)? I would like to be sure that there are no possibilities of use
networking functions in RT modules, and the only solution is the use of the
kernel API.

	Thank you very much in advance.


> -- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
> echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
> --
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/
-- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail majordomo@rtlinux.org OR
echo "unsubscribe rtl <Your_email>" | mail majordomo@rtlinux.org
--
For more information on Real-Time Linux see:
http://www.rtlinux.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic