Jan Calling rtdm_in_rt_context() returns the following values in the following functions: init_module(): 0 recv_msg(): 1 send_msg(): 1 This is correct, I assume?
Regarding the rt_assign_irq_to_cpu: I am not too sure what it is for, I am ashamed to say - it is used in some RTAI showroom examples, and in particular one that I copied&pasted some code from. I removed it, and it didn't seem to make any difference. Another question - is it necessary to include rtdm/rtdm.h? Some facts that might be relevant: 1. When compiling I get the following warning: /usr/realtime/include/rtai_sanity.h:24:2: warning: #warning : You are likely using an unsuported GCC version! Please read GCC-WARNINGS carefully. I can't find this GCC-WARNINGS file (a post on the net refers to the RTAI source tree, but I can't find it there). I am using GCC 4.1.0. 2. Every now and then I get the following message: UNEXPECTED FPU TRAP FROM HARD PID = xxxx (The PID is for "insmod rtai_lxrt.ko") 3. Sometimes, after multiple module load/unload/recompile etc. cycles, every key that I press is repeated about 20 times (or the PC hangs). I then have to reboot. Sometimes after the reboot the PC hangs during the boot process, but then boots OK after a further reboot. 4. My machine is a AMD Athlon 1.4GHz, with a AMD761 K7 chipset. Thanks for the help! Thinus -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 31 July 2006 19:55 To: Thinus Viljoen Cc: rtnet-users@lists.sourceforge.net Subject: Re: [RTnet-users] RTnet in RTAI kernel space Thinus Viljoen wrote: > I got the kernel mode module to compile by including > /usr/src/linux/include/linux/in.h > and > /usr/src/linux/include/linux/net.h > > It is a modified version of the RTnet 0.8.3 "raw-packets.c" example. The > module periodically transmits, and continuously receives LAN packets. The > modified version uses (sin_family=AF_INET), where the old one used > (sll_family=PF_PACKET). I also added a socket - one is used for Rx, while the > other is used for Tx. > > When I load the module, both rt_dev_recv() and rt_dev_sendmsg() return error > code -38. My question is basically - what is this error code? I am not too > sure where to look. 38 means ENOSYS, and this means -translated- that there is no receive or send service available for your socket in your current execution context. As RTnet is correctly installed (otherwise socket creation would have failed), only the execution context can be a problem here (send and recv only works in RT context). But before starting to speculate further: Could you add this to the beginning of one of your task functions: printk("rtdm_in_rt_context = %d\", rtdm_in_rt_context()); Maybe you have to include rtdm/rtdm_driver.h to resolve rtdm_in_rt_context. It should should give a non-zero result. Two remarks on the code: o What is rt_assign_irq_to_cpu for? o Take care to not collide with some other module starting the timer. When using the full RTnet stack (RTmac/TDMA, RTcfg), it will do this for you. Better keep this part configurable (=> module parameter). Thanks, Jan ******************************************************************************************************* Disclaimer: The information contained in this communication is confidential and may be legally privileged. It is intended solely for the use of the individual or entity to whom it is addressed and others authorised to receive it. Any review, retransmission, dissemination, copying, disclosure or other use of, or taking of any action in reliance upon, this information by person or entities other then the intended recipient is prohibited. If you have received this message in error, please notify the sender immediately by e-mail, facsimile or telephone and return and/or destroy the original message and all copies from any computer. Denel (Pty) Ltd exercises no editorial control over e-mail messages originating in the organisation and does not accept any responsibility for either the contents of the message or any copyright laws that may have been violated by the person sending this message. Denel (Pty) Ltd is neither liable for the proper and complete transmission of the information contained in this communication nor any delay in its receipt. This message should not be copied or used for any purpose other than intended, nor should it be disclosed to any other person. ******************************************************************************************************* ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ RTnet-users mailing list RTnet-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rtnet-users