On Tue, 30 Oct 2001 11:24:09 +0100 (CET) Peter Gr�ssinger <[EMAIL PROTECTED]> wrote:
> hello, > > i am running rtlinux 2.3 on a PC104. i was trying to use the > function fopen() within the init_module of my kernel module. when > inserting the module i unfortunately get the error "unresolved symbol > fopen". fopen is a userspace funktion library and not a kernelspace one. Thats the reason for the message "unresolved symbol". > > would sombody know how to upgrade the c lib in order so be able to load > my module ? you can not link dynamik to a userspace c library from a kernel module, unless it is a part of the kernel. I have heard somebody who had link static to some library (I think it was the math library). then it was a stand alone program. result -> bigggg kernel modules <- :-) BTW. fopen.... If you use this funktion, you have to go through the Linux Kernel, and if you try to get some data from this file from a RTLinux thread you also go through the RTLinux kernel. You can not do that!!!! If the CPU is preempted, while reading the file, you will leave the Linux kernel in a undefined state (it may (5% chance of succes i gees) crash). One way to solve the problem is to open the file in userspace and send the infomation to the RTLinux thread through a fifo or using the mbuf module. Anders Gnistrup -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED] -- For more information on Real-Time Linux see: http://www.rtlinux.org/
