Re: [rtl] wake_up_interruptible from RT ISR?
Tomasz Motylewski wrote: > > I would like to ask whether calling wake_up_interruptible is OK in RTL and > RTAI from real time ISR (or RT task)? I remember some discussion where Paolo > stated it is possible in RTAI. > > Another question is whether I can use standard wake_up_interruptible() kernel > call, or I have to change it to some other function? > > I have the following situation in mind: I have normal Linux interrupt > handler, packing data into static buffer. It then calls > wake_up_interruptible. Can I just register this handler as RT IRQ handler > without any modification? When the woken up task will run? On next regular > timer tick? Or after any other soft Linux interrupt (when BH is processed)? > > I hope the answer can be added to: > http://gatling.aszi.sztaki.hu/~kissg/doc_nmt/context.html > > Best regards, If I said that I was wrong. Maybe I was misunderstood, the technique explained below is native in RTAI. I used it to implement fifos, where you have just the same problem, when in RTL there was still a patch to run a specific treal time task queue. In any case sorry. In fact you should not wake up Linux processes within real time, as your interrupt can have interrupted just an atomic process list management within wake up itself, and that can cause troubles. Maybe it can work if your task wait queue contains just one process. The safe way is to have an RTAI sysreq pended so that it can be managed when the CPU is passed back to Linux. There is no loss of efficiency as in any case the waken up process will run only when Linux is back in charge. I guess is the same in RTL now. Ciao, Paolo. -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] problem about rtl installation!
hi,everybody!I am a freshman in this list. These days,I need to change my linux to rtlinux. My linux kernel is 2.2.10 (Turbolinux 4.0),and I use RTL Version 2.0,Kernel-Version 2.2.13 to update it. I install my rtlinux as following steps: 1.tar -xzvf /usr/src/rtlinux-2.0-prepatched.tgz 2.rm /usr/src/linux ln -s /usr/src/rtlinux-2.0/linux /usr/src/linux 3.make menuconfig(I am sure I select "hard real time" and I disable "APM support") 4.make dep make bzImage 5.make modules make modules_install 6.make install 7.modify lilo.conf run /sbin/lilo 8.shutdown -r now 9.make make install Then I try a example to test inserttupts. I copy and paste this program from www.rtlinux.org it as follows: #include #include #include #include #include #include pthread_t thread; unsigned int intr_handler(unsigned int irq, struct pt_regs *regs) { outb(0, 0x378); //this is our interrupt handler //which resets the output of 5V on pin 2 rtl_hard_enable_irq(7); //<-- if got an irq, reenable irq return 0; } void * start_routine(void *arg) { struct sched_param p; p . sched_priority = 1; pthread_setschedparam (pthread_self(), SCHED_FIFO, &p); pthread_make_periodic_np (pthread_self(), gethrtime(), 10); //10ns = 10 kHz while (1) {//we have a periodic trigger which pthread_wait_np(); //creates a periodic output of outb(3, 0x378); //+5V on pins 2 & 3. } return 0; } int init_module(void) { //this init module will enable int status; //your interrupt rtl_irqstate_t f; rtl_no_interrupts(f); status = rtl_request_irq(7, intr_handler); //if IRQ-handler is OK rtl_printf("rtl_request_irq: %d\n", status); //this will output 0 //on your console /* enbable parallel port interrupt */ outb_p(inb_p(0x37A) | 0x10, 0x37A); outb_p(inb_p(0x21) & (~0x80), 0x21); outb_p(0x20, 0x20); rtl_hard_enable_irq(7); rtl_restore_interrupts(f); outb(0, 0x378); //before we start reset any output on the parallel port return pthread_create (&thread, NULL, start_routine, 0); } void cleanup_module(void) { //this cleanup module disables rtl_free_irq(7); //your interrupt pthread_delete_np (thread); } I use make -f rtl.mk parport to compile it. however i saw many error information such as: /tmp/ccrqTc3c.o In function "intr_handler": /tmp/ccrqTc3c.o(.text+0xb):undefined reference to "rtl_hard_enable_irq"; /tmp/ccrqTc3c.o(.text+0x32):undefined reference to "rtl_sched"; . I don't know thy -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] problem about rtl installation!
hi,everybody!I am a freshman in this list. These days,I need to change my linux to rtlinux. My linux kernel is 2.2.10 (Turbolinux 4.0),and I use RTL Version 2.0,Kernel-Version 2.2.13 to update it. I install my rtlinux as following steps: 1.tar -xzvf /usr/src/rtlinux-2.0-prepatched.tgz 2.rm /usr/src/linux ln -s /usr/src/rtlinux-2.0/linux /usr/src/linux 3.make menuconfig(I am sure I select "hard real time" and I disable "APM support") 4.make dep make bzImage 5.make modules make modules_install 6.make install 7.modify lilo.conf run /sbin/lilo 8.shutdown -r now 9.make make install Then I try a example to test inserttupts. I copy and paste this program from www.rtlinux.org it as follows: #include #include #include #include #include #include pthread_t thread; unsigned int intr_handler(unsigned int irq, struct pt_regs *regs) { outb(0, 0x378); //this is our interrupt handler //which resets the output of 5V on pin 2 rtl_hard_enable_irq(7); //<-- if got an irq, reenable irq return 0; } void * start_routine(void *arg) { struct sched_param p; p . sched_priority = 1; pthread_setschedparam (pthread_self(), SCHED_FIFO, &p); pthread_make_periodic_np (pthread_self(), gethrtime(), 10); //10ns = 10 kHz while (1) {//we have a periodic trigger which pthread_wait_np(); //creates a periodic output of outb(3, 0x378); //+5V on pins 2 & 3. } return 0; } int init_module(void) { //this init module will enable int status; //your interrupt rtl_irqstate_t f; rtl_no_interrupts(f); status = rtl_request_irq(7, intr_handler); //if IRQ-handler is OK rtl_printf("rtl_request_irq: %d\n", status); //this will output 0 //on your console /* enbable parallel port interrupt */ outb_p(inb_p(0x37A) | 0x10, 0x37A); outb_p(inb_p(0x21) & (~0x80), 0x21); outb_p(0x20, 0x20); rtl_hard_enable_irq(7); rtl_restore_interrupts(f); outb(0, 0x378); //before we start reset any output on the parallel port return pthread_create (&thread, NULL, start_routine, 0); } void cleanup_module(void) { //this cleanup module disables rtl_free_irq(7); //your interrupt pthread_delete_np (thread); } I use "make -f rtl.mk parport" to compile it. however i saw many error information such as: /tmp/ccrqTc3c.o In function "intr_handler": /tmp/ccrqTc3c.o(.text+0xb):undefined reference to "rtl_hard_enable_irq"; /tmp/ccrqTc3c.o(.text+0x32):undefined reference to "rtl_sched"; . I don't know Why? and I lose my net card also,it is a common ne2000 compatible. Thanks in advance! -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] wake_up_interruptible from RT ISR?
I would like to ask whether calling wake_up_interruptible is OK in RTL and RTAI from real time ISR (or RT task)? I remember some discussion where Paolo stated it is possible in RTAI. Another question is whether I can use standard wake_up_interruptible() kernel call, or I have to change it to some other function? I have the following situation in mind: I have normal Linux interrupt handler, packing data into static buffer. It then calls wake_up_interruptible. Can I just register this handler as RT IRQ handler without any modification? When the woken up task will run? On next regular timer tick? Or after any other soft Linux interrupt (when BH is processed)? I hope the answer can be added to: http://gatling.aszi.sztaki.hu/~kissg/doc_nmt/context.html Best regards, -- Tomek -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] APM alert !!!!
On Thu, Jun 01, 2000 at 04:37:35PM +0100, Stuart Hughes wrote: > Hi Victor, > > Tried it on RTLinux 2.3/Linux 2.2.14. Exactly the same effect. If you > cat /proc/apm, the jitter jumps out to ~ 7 miliseconds. > > Regards, Stuart. > Every so often, a thread comes up in the Linux kernel mailing list about modifying the kernel to run APM inside a virtual machine, since APM also causes problems with SMP. There is already other code doing this, such as (I think) the VESA framebuffer code and BIOS calls on other architectures. Usually, the thread erupts into a flamewar about the stupidities involved with running something inside a virtual machine _inside_ the kernel. Supposedly, ACPI will solve these problems, except that a) ACPI doesn't work on my machine, and b) the user-space ACPI code was developed independently from the APM code, and thus is incompatible. Go figure. dave... -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] PCI Analog Input Cards & RTLinux
I have posted a D/A PCI driver, and am currently working on a DAS1200/JR PCI driver which will also appear in my Real Time Controls Laboratory (RTiC-Lab) website as soon as I finish it and test it thoroughly. There are also two computer boards ISA drivers in the website. http://128.143.47.231/~efh4v/rtic-lab.html I hope that this helps. By the way, do you really mean 100-300 kilo-Hz sampling rate in your message??? Or was this a typo? -Edgar PS. I am drenched in sweat over here. It is amazingly balmy... "Jennings, Richard R" wrote: > Greetings all, > The ISA bus analog input board we are using is > now obsolete. We are looking for a PCI bus > board to replace it. > > The system currently runs DOS but it is one > of my pet projects to port the application > to RTLinux (when I get budget). > > So, the question is: what PCI analog input > board is well supported under RTLinux? > 12-bit, moderate sample rate (~100-300KHz), > 16 inputs. Computerboards PCI-DAS1200/JR > and Industrial Computer Source (now ICS > Advent) PCI-AI/1216 are under consideration. > > On another related subject, what is the > status of the RTLinux Ethernet driver > that supports a dedicated controller > using UDP/IP protocol? > > Any inputs are appreciated. > > P.S. It will be a balmy day in St. Louis > with a high in the lower 90's with 50%+ > humidity. > > Regards, > Rich > > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl " | mail [EMAIL PROTECTED] > --- > For more information on Real-Time Linux see: > http://www.rtlinux.org/rtlinux/ -- -- Edgar F. Hilton email: [EMAIL PROTECTED] office#: (804) 924-6233 fax#: (804) 982-2246 http://www.people.virginia.edu/~efh4v -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] RTAI 1.3 - Parallel Port woes
On Thu, 1 Jun 2000, Louis Koziarz wrote: > I'm writing a parallel port driver under RTAI 1.3 (redhat kernel > 2.2.14-5.0). I'm noticing that as soon as the kernel unpacks and tbe boot > process begins, the data lines on the parallel port start thrashing like > crazy. The control lines are quiet, however. May be they are configured as inputs by default (no driver)? Try to connect some of them with 2 kOhm resistor to +5V and see then. Could be also that some drivers autoprobing are looking there. I think there was some way of making IO region excluded from autoprobe. -- Tomek -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] Many Questions - VME, Scheduling, Semaphores, Interrupts, Etc.
> "Stephen" == Stephen D Cohen <[EMAIL PROTECTED]> writes: Stephen> 3) How do I get sprintf or rtl_printf to format a floating Stephen> point number for me? I'm getting tired of printing 1000 Stephen> times my float as a long and adding the decimal point in my Stephen> head. Must be something simple (and stupid) that I am doing Stephen> wrong. You could send the data to a Linux thread (via a fifo) and have it printed there in any form you like. Alternatively, sprintf the integer, then do some string fiddling on the result to insert the period, then print the resulting string... paul -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] RTAI 1.3 - Parallel Port woes
Louis Koziarz wrote: > > Hi, I'm a little new here, please forgive me if is old hat to some of you. > I've done my best searching the mailing list archives to see if I could > find a solution to my problem. > > I'm writing a parallel port driver under RTAI 1.3 (redhat kernel > 2.2.14-5.0). I'm noticing that as soon as the kernel unpacks and tbe boot > process begins, the data lines on the parallel port start thrashing like > crazy. The control lines are quiet, however. > > At first I thought something was mirroring the system console to the port, > but now I suspect that it's the IDE channel doing it. This is on a > SuperMicro 370 ATX motherboard. Every keystroke or little bit of IDE > traffic moves the data lines around. When I start rtai_sched, the port > begins to scream as well. I've rebuilt the entire kernel with ALL parallel > port modules (paride, parport) turned off and it STILL happens! I've even > tried moving the parallel port IRQ to 5 in the BIOS. > > I've seen previous messages referring to the fact that the parallel port > soaks up all spurious interrups that the system may not catch, but then > again I don't see this behavior in DOS at all. The port is quiet through > the entire boot process, which is what I need to make my hardware happy. > > So, my questions: > > 1) Could something still be mirroring the console to the parallel port? > All versions of the kernel I try seem to do this during boot/init and > runlevel 3. > > 2) Why is rtai_sched messing with the port? > > 3) How can I start to fix this? > > Thanks in advance for any help you all can offer... Hi Louis, My guess is that this is some problem with your hardware. Do you have another machine you can try this on. I have been using RTAI 1.3 to do parallel port related stuff with no problem. Regards, Stuart -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] rt_com problems
Thanks a lot, but I am not an expert in serial programming, I execute minicom, and in O opcion i can configure some things, but How can i receive data with minicom? with my linux program, send chars ('a', 'b', etc) to serial port , How can i see this chars in the oposite linuxPC with minicom? Excuse me for my ignorance in minicom and Thanks a lot! -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] Many Questions - VME, Scheduling, Semaphores, Interrupts, Etc.
Hi Stephen, On Thu, Jun 01, 2000 at 09:29:36AM -0400, Stephen D. Cohen wrote: > 3) How do I get sprintf or rtl_printf to format a floating point number for > me? I'm getting tired of printing 1000 times my float as a long and adding > the decimal point in my head. Must be something simple (and stupid) that I > am doing wrong. > You have no floating point format support in kernel memory space. Probably the easiest solution for you is to pass your FP numbers to a Linux process using fifo or shared memory and print them by the Linux process. My RT application needs some FP format routines like strtod, full sprintf. I've grabbed unmodified sources from glibc, compiled them with RT compiler options and linked the result with my application. It should not work, but it does. :-O regards, -- .. Pavel Andris | tel: +421 7 5941 2167 Institute of Control Theory and Robotics | fax: +421 7 5477 6045 Slovak Academy of Sciences | Dubravska cesta 9 | e-mail: [EMAIL PROTECTED] SK - 842 37 Bratislava | Slovakia | . -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] APM alert !!!!
Hi Victor, Tried it on RTLinux 2.3/Linux 2.2.14. Exactly the same effect. If you cat /proc/apm, the jitter jumps out to ~ 7 miliseconds. Regards, Stuart. Stuart Hughes wrote: > > Hi Victor, > > The version was RTAI-1.3 and Linux 2.2.14 on top of a RedHat 6.2, the > machine was an Inspiron 7000 with bios power saving disabled (disk power > down etc) but with APM support in the Linux kernel. I'll be running the > same test on RTLinux 2.3 and post the results. > > Regards, Stuart. > > [EMAIL PROTECTED] wrote: > > > > Stuart: > >What's the version information on this? > > > > On Thu, Jun 01, 2000 at 11:39:29AM +0100, Stuart Hughes wrote: > > > I always knew that APM was bad news for realtime (as it does cli etc), > > > but I was not aware that gettting the APM info from proc was also a > > > disaster. While running some jitter tests that normally give +/- 7usec > > > on a quite machine, I did a cat /proc/apm, this pushed the upper limit > > > to 7milliseconds. So beware, just running a little X helper like xapm > > > (now disapeared from the latest redhat) will cause your realtime to > > > miss-behave. > > > > > > Conclusion: If you have APM enabled at all, beware as your real-time > > > programs can go out to lunch (even things as innocent as plugging in the > > > power cable to your laptop). > > > -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] RTAI 1.3 - Parallel Port woes
Louis Koziarz wrote: > > Hi, I'm a little new here, please forgive me if is old hat to some of you. > I've done my best searching the mailing list archives to see if I could > find a solution to my problem. > > I'm writing a parallel port driver under RTAI 1.3 (redhat kernel > 2.2.14-5.0). I'm noticing that as soon as the kernel unpacks and tbe boot > process begins, the data lines on the parallel port start thrashing like > crazy. The control lines are quiet, however. > > At first I thought something was mirroring the system console to the port, > but now I suspect that it's the IDE channel doing it. This is on a > SuperMicro 370 ATX motherboard. Every keystroke or little bit of IDE > traffic moves the data lines around. When I start rtai_sched, the port > begins to scream as well. I've rebuilt the entire kernel with ALL parallel > port modules (paride, parport) turned off and it STILL happens! I've even > tried moving the parallel port IRQ to 5 in the BIOS. > > I've seen previous messages referring to the fact that the parallel port > soaks up all spurious interrups that the system may not catch, but then > again I don't see this behavior in DOS at all. The port is quiet through > the entire boot process, which is what I need to make my hardware happy. > > So, my questions: > > 1) Could something still be mirroring the console to the parallel port? > All versions of the kernel I try seem to do this during boot/init and > runlevel 3. > > 2) Why is rtai_sched messing with the port? > > 3) How can I start to fix this? > > Thanks in advance for any help you all can offer... We use the parport normally in many applications, see the parport example in the RTAI distribution. Note however that the RTAI patched kernel we use is compiled without any parport support. So when it boots he does not know of any parport. You must check that by doing "cat /proc/interrupts" no parport interrupt is seen by the kernel, usually it is #7 If that is not the case check your kernel configuration. The rtai_schedulers have nothing to do with parports. Ciao, Paolo. -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] APM alert !!!!
Hi Victor, The version was RTAI-1.3 and Linux 2.2.14 on top of a RedHat 6.2, the machine was an Inspiron 7000 with bios power saving disabled (disk power down etc) but with APM support in the Linux kernel. I'll be running the same test on RTLinux 2.3 and post the results. Regards, Stuart. [EMAIL PROTECTED] wrote: > > Stuart: >What's the version information on this? > > On Thu, Jun 01, 2000 at 11:39:29AM +0100, Stuart Hughes wrote: > > I always knew that APM was bad news for realtime (as it does cli etc), > > but I was not aware that gettting the APM info from proc was also a > > disaster. While running some jitter tests that normally give +/- 7usec > > on a quite machine, I did a cat /proc/apm, this pushed the upper limit > > to 7milliseconds. So beware, just running a little X helper like xapm > > (now disapeared from the latest redhat) will cause your realtime to > > miss-behave. > > > > Conclusion: If you have APM enabled at all, beware as your real-time > > programs can go out to lunch (even things as innocent as plugging in the > > power cable to your laptop). > > > > Regards, Stuart > > -- [rtl] --- > > To unsubscribe: > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > > echo "unsubscribe rtl " | mail [EMAIL PROTECTED] > > --- > > For more information on Real-Time Linux see: > > http://www.rtlinux.org/rtlinux/ > > -- > - > Victor Yodaiken > FSMLabs: www.fsmlabs.com www.rtlinux.com > FSMLabs is a servicemark and a service of > VJY Associates L.L.C, New Mexico. -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] APM alert !!!!
Stuart: What's the version information on this? On Thu, Jun 01, 2000 at 11:39:29AM +0100, Stuart Hughes wrote: > I always knew that APM was bad news for realtime (as it does cli etc), > but I was not aware that gettting the APM info from proc was also a > disaster. While running some jitter tests that normally give +/- 7usec > on a quite machine, I did a cat /proc/apm, this pushed the upper limit > to 7milliseconds. So beware, just running a little X helper like xapm > (now disapeared from the latest redhat) will cause your realtime to > miss-behave. > > Conclusion: If you have APM enabled at all, beware as your real-time > programs can go out to lunch (even things as innocent as plugging in the > power cable to your laptop). > > Regards, Stuart > -- [rtl] --- > To unsubscribe: > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > echo "unsubscribe rtl " | mail [EMAIL PROTECTED] > --- > For more information on Real-Time Linux see: > http://www.rtlinux.org/rtlinux/ -- - Victor Yodaiken FSMLabs: www.fsmlabs.com www.rtlinux.com FSMLabs is a servicemark and a service of VJY Associates L.L.C, New Mexico. -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] Is this how RTL Looks?
> "Mark" == Mark <[EMAIL PROTECTED]> writes: Mark> Many thanks for the replies - very helpful. One other thing I Mark> want to get straight - Which is technically correct (With Mark> Respect to the latest RT-Linux): Mark> 1) One Process over all with several threads running inside it Mark> (Would seem the most likely given the POSIX thread Mark> concept. Where one is Linux Mark> 2) Several processes running on the RTL kernel, where the idle Mark> one is Linux. Keep in mind that the distinction of process vs. thread is an artificial one for many systems. You may be thinking of VMS, which originally had no threads (only heavy processes) and threads were added on much later. As a result, the scheduler schedules processes and within that something else schedules threads. In Linux, for example, things don't work that way. The scheduler sees threads. Threads have some private resources and some shared ones; the most common distinction is that some threads have separate memory. Those would conventionally be called "processes" but to the scheduler they aren't distinct. To see this, run a multi-threaded application and type "ps". You'll see separate "process" entries listed for each thread -- because ps is really a thread lister... paul -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] RTAI 1.3 - Parallel Port woes
Hi, I'm a little new here, please forgive me if is old hat to some of you. I've done my best searching the mailing list archives to see if I could find a solution to my problem. I'm writing a parallel port driver under RTAI 1.3 (redhat kernel 2.2.14-5.0). I'm noticing that as soon as the kernel unpacks and tbe boot process begins, the data lines on the parallel port start thrashing like crazy. The control lines are quiet, however. At first I thought something was mirroring the system console to the port, but now I suspect that it's the IDE channel doing it. This is on a SuperMicro 370 ATX motherboard. Every keystroke or little bit of IDE traffic moves the data lines around. When I start rtai_sched, the port begins to scream as well. I've rebuilt the entire kernel with ALL parallel port modules (paride, parport) turned off and it STILL happens! I've even tried moving the parallel port IRQ to 5 in the BIOS. I've seen previous messages referring to the fact that the parallel port soaks up all spurious interrups that the system may not catch, but then again I don't see this behavior in DOS at all. The port is quiet through the entire boot process, which is what I need to make my hardware happy. So, my questions: 1) Could something still be mirroring the console to the parallel port? All versions of the kernel I try seem to do this during boot/init and runlevel 3. 2) Why is rtai_sched messing with the port? 3) How can I start to fix this? Thanks in advance for any help you all can offer... Louis Koziarz -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] Many Questions - VME, Scheduling, Semaphores, Interrupts, Etc.
RTLinux Gurus, A few questions regarding RTLinux: 1) Has anyone succeeded in getting RTLinux running on a VME based system? I will be using one of the VMIC boards based on the Tundra Universe II PCI-VME bridge chips. I can always glom code from the VMELinux guys, I was just wondering if someone has already done the work. 2) I am curious as to the determinacy of the thread wakeup command. We will be using a periodic task that is woken up by an interrupt. With VxWorks I would have simply had the process to be woken block on a semaphore which would be given by ISR for the interrupt. That way I prevent executing too much code at ISR time (always a bad idea). Can I do the same thing with the pthread wakeup stuff? It would seem that, for process synchronization at least, the pthread suspend and wake stuff will replace the classical use of semaphores. Is this right? 3) How do I get sprintf or rtl_printf to format a floating point number for me? I'm getting tired of printing 1000 times my float as a long and adding the decimal point in my head. Must be something simple (and stupid) that I am doing wrong. I anxiously await your replies. Regards, Steve -- Stephen D. Cohen, Engineering Manager Xybion Positioning Systems 11528 53rd Street North Clearwater, FLA 33760 phone: (727) 299-0150, fax: (727) 299-0804 -- -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
RE: [rtl] RTLinux and joystick
Richard, We've got an RS232 joystick which is currently moving a pedestal quite nicely. I have not done the initial work on it so can't remember the specifices, but I believe it sends digital commands. Also, it was not too expensive, but I can't remember the price, but can find out. So, BOTTOM LINE, if you'd like more info on our use of this joystick. Let me know and I'll refresh my memory (which I need to do anyway since have to integrate all this soon). Janet Estabridis Electrical Engineer NAWC Code 473E00D Building 31440 Room 1017 China Lake, CA 93555 [EMAIL PROTECTED] (760) 939-2896 FAX (760) 939 -3075 > -Original Message- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: Wednesday, May 31, 2000 1:34 PM > To: Basham, Richard R > Cc: Andrew Price; '[EMAIL PROTECTED]'; Tomasz Motylewski; > [EMAIL PROTECTED] > Subject: Re: [rtl] RTLinux and joystick > > > I very much expect that a USB joystick would solve the problem. The game > port > is a casette tape period device. > > On Wed, May 31, 2000 at 12:28:02PM -0700, Basham, Richard R wrote: > > I am not familiar with your desired final product but I would mention > that joysticks usually have resistive potentiometers and therefore could > be used to feed the input to an ADC board. This would probably get around > some of the hardware/driver issues associated with the inexpensive I/O > architecture of the game port. Obviously, this reduces the generic PC > portability and increases the complexity. > > > > I wonder how using the game port differs from the same joystick with > USB? Anyone? > > > > Just a thought, > > Rich > > > > > -- > > > From: [EMAIL PROTECTED][SMTP:[EMAIL PROTECTED]] > > > Sent: Wednesday, May 31, 2000 10:04 AM > > > To: Andrew Price > > > Cc: Tomasz Motylewski; [EMAIL PROTECTED] > > > Subject: Re: [rtl] RTLinux and joystick > > > > > > On Wed, May 31, 2000 at 02:56:56PM +1000, Andrew Price wrote: > > > > I ran a very small real time application whose sole purpose was to > > > > toggle > > > > a bit of the parallel port every 100us. > > > > > > > > In the long term I will use this to schedule events etc etc.. > > > > > > > > The application I am working on also has need for the joystick. > > > > > > > > When I ran up the current joystick driver for linux, and in > particular > > > > the > > > > joystick driver for the microsoft (cringe) sidewinder it caused the > > > > system > > > > to lock up. If I slowed the rate of the real time process. to one > toggle > > > > every 2ms > > > > the joystick operates normally. > > > > > > > > > > > > I used the example program for latency testing for the parallel port > > > > along with > > > > 'jstest' an example that is packaged with the current joystick > driver > > > > for linux. > > > > > > > > > > > > Can anyone explain why the high rate of the real time process > affects > > > > what the joystick, > > > > a common garden variety process is doing? > > > > > > A quick look at the sidewinder driver shows this amusing comment: > > > > > > /* > > > * js_sw_read_packet() is a function which reads either a data packet, > or an > > > * identification packet from a SideWinder joystick. Better don't try > to > > > * understand this, since all the ugliness of the Microsoft Digital > > > * Overdrive protocol is concentrated in this function. If you really > want > > > * to know how this works, first go watch a couple horror movies, so > that > > > * you are well prepared, read US patent #5628686 and then e-mail me, > > > * and I'll send you an explanation. > > > * Vojtech <[EMAIL PROTECTED]> > > > */ > > > > > > > > > and then this cli protected code: > > >do { > > > bitout--; > > > u = v; > > > v = inb(io); > > > } while (!(~v & u & 0x10) && (bitout > 0)); /* > Wait for first falling edge on clock */ > > > > > > So it tries to turn off interrupts and do a busy wait for a falling > edge. I bet these > > > last for near millisecond periods -- with a 100us RT thread > interrupting the device > > > is not going to work well at all. > > > > > > Sorry. One solution is to get a better joystick. Another is to run on > a SMP board. > > > > > > > > > > > > > > > -- > > > - > > > Victor Yodaiken > > > FSMLabs: www.fsmlabs.com www.rtlinux.com > > > FSMLabs is a servicemark and a service of > > > VJY Associates L.L.C, New Mexico. > > > > > > -- [rtl] --- > > > To unsubscribe: > > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR > > > echo "unsubscribe rtl " | mail [EMAIL PROTECTED] > > > --- > > > For more information on Real-Time Linux see: > > > http://www.rtlinux.org/rtlinux/ > > > > > -- > - > Victor Yodaiken > FSMLabs: www.fsmlabs.com www.rtlinux.com > FSMLabs is a servic
Re: [rtl] Compile version error
Are you including "rtl.h" ? Mohan Kumar H wrote: > > > Hai, > > I Installed RTLinux version 2.2 on Linux Kernel version 2.2.14 ( Red > Hat Release 6.2). > > If I compile the RTLinux program it is compiling without any errors > and warnings. But when I load this to kernel by using the command > insmod it is giving an message of CAN NOT FIND THE KERNEL VERSION > THE MODULE WAS COMPILED FOR. > > I do not what is the reason. > > But with the same option if I compile the RT linux Examples program, > it is working perfectly fine. > > The steps I followed for compilation are. > > 1. Use the same compiler option given in rtl.mk file > > 2. get the xxx.o object file. > > 3 . insert rtl modules to the kernel . ( use insrtl command in > /usr/src/rtlinux-2.2) > > 4. insmod xxx.o (insert the xxx object file into kernel) > > Thanks for your suggestions, > > Bye, > > Mohan -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] PCI Analog Input Cards & RTLinux
Greetings all, The ISA bus analog input board we are using is now obsolete. We are looking for a PCI bus board to replace it. The system currently runs DOS but it is one of my pet projects to port the application to RTLinux (when I get budget). So, the question is: what PCI analog input board is well supported under RTLinux? 12-bit, moderate sample rate (~100-300KHz), 16 inputs. Computerboards PCI-DAS1200/JR and Industrial Computer Source (now ICS Advent) PCI-AI/1216 are under consideration. On another related subject, what is the status of the RTLinux Ethernet driver that supports a dedicated controller using UDP/IP protocol? Any inputs are appreciated. P.S. It will be a balmy day in St. Louis with a high in the lower 90's with 50%+ humidity. Regards, Rich -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] Compile version error
Mohan > I Installed RTLinux version 2.2 on Linux Kernel version 2.2.14 ( Red Hat Release >6.2). > > If I compile the RTLinux program it is compiling without any errors and warnings. >But when I load this to kernel by using the command > insmod it is giving an message of CAN NOT FIND THE KERNEL VERSION THE MODULE WAS >COMPILED FOR. > > I do not what is the reason. > Check that you have the correct includes in your module look at : http://realtimelinux.org/articles/linux-expo/montreal/paper/ModuleBasics/ModuleBasicsC.html Regards, Phil Wilshire -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] APM alert !!!!
I always knew that APM was bad news for realtime (as it does cli etc), but I was not aware that gettting the APM info from proc was also a disaster. While running some jitter tests that normally give +/- 7usec on a quite machine, I did a cat /proc/apm, this pushed the upper limit to 7milliseconds. So beware, just running a little X helper like xapm (now disapeared from the latest redhat) will cause your realtime to miss-behave. Conclusion: If you have APM enabled at all, beware as your real-time programs can go out to lunch (even things as innocent as plugging in the power cable to your laptop). Regards, Stuart -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] Compile version error
> Mohan Kumar H wrote: > > Hai, > > I Installed RTLinux version 2.2 on Linux Kernel version 2.2.14 ( Red > Hat Release 6.2). > > If I compile the RTLinux program it is compiling without any errors > and warnings. But when I load this to kernel by using the command > insmod it is giving an message of CAN NOT FIND THE KERNEL VERSION > THE MODULE WAS COMPILED FOR. > > I do not what is the reason. > Hi Mohan, You need to do the following: 1/ Make sure you have -D__KERNEL__ -DMODULE in your compiler options when building the .o file 2/ Make sure you include the following header files in your .c file (you also need the RT headers): #include #include Regards, Stuart -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] HTML attachments
Is it possible to reconfig list processor software that it rejects mails with HTML attachments? Why peoples want to waste MY bandwith? Regards Gabor - Idiotic M$ software rules, I suck. :-( -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
Re: [rtl] Is this how RTL Looks?
[EMAIL PROTECTED] writes: > > 1) One Process over all with several threads running inside it (Would > > seem the most likely given the POSIX thread concept. Where one is Linux > > Yes. Although Linux has its own kernel-threads and user processes and the user >processes > may have POSIX threads inside 'em. > > 2) Several processes running on the RTL kernel, where the idle one is > > Linux. > > You can think of it this way, if you think of the RTthreads as "processes". The > general convention is that a "process" probably has memory protection and threads > share address space (although this is not always observed) so (1) is more correct. Well, that´s pretty similar to "somewhat pregnant" :-) It actually tells exactly what it is: There is no general consensus on the exact meaning of process vs. thread. So there is no single answer to the original question that is considered the one and only correct one by everybody. It's research, not textbook mathematics. (Though _I_ wouldn't call it science:-) Jochen -- Heinrich-Heine-Universität, Institut für Physikalische Chemie I Universitätsstr. 1, Geb. 26.43 Raum 02.29 40225 Düsseldorf, Germanyphone ++49-211-8113681 http://www.Jochen-Kuepper.de fax ++49-211-8115195 -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/
[rtl] rt_com problem
Wenfeng Liu writes: > When I insert rt_com module successfully, My network adapter > can not work correctly...Why??? You need to provide some more infos :-? Just guessing: What interrupts is the nic using ? rt_com doesn´t wanna share it´s interrupts. Jochen -- Heinrich-Heine-Universität, Institut für Physikalische Chemie I Universitätsstr. 1, Geb. 26.43 Raum 02.29 40225 Düsseldorf, Germanyphone ++49-211-8113681 http://www.Jochen-Kuepper.de fax ++49-211-8115195 -- [rtl] --- To unsubscribe: echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR echo "unsubscribe rtl " | mail [EMAIL PROTECTED] --- For more information on Real-Time Linux see: http://www.rtlinux.org/rtlinux/