Re: [rtl] FIFO is not available
What's the error return from the rtf_put? On Mon, Jul 31, 2000 at 05:57:40PM -0700, [EMAIL PROTECTED] wrote: > > > Hello, > I am still having problem accessing one of my FIFOs. > This FIFO was created by a real-time module, and it is write-only. > Now, another real-time module is accessing it and tries to write to it. > I get "Can't send a command to Real-time task" error no matter what I do. > What makes me curious that I can access the same FIFO from a user > program no problem. > I know that FIFOs are pipes, and they have identifiers that should be > accessible to any module that __did_not__open this particular FIFO ? > > Otherwise, how do I make sure that the FIFO that I am trying to access is > not "tied up" by another module that has created it and may be using it ? > Do I need to lock out critical sections so no 2 accesses are done > simutaneously on the same FIFO or rt linux has a lock already ? > > Sincerely, > Olga > > > > > __ > > Olga Mill ([EMAIL PROTECTED]) > Eastern Washington University > > Voice Mail :(509) 359-6907 > > __ > > > -- [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 Finite State Machine Labs: The RTLinux Company. www.fsmlabs.com www.rtlinux.com -- [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] Fifo is not available (continued)
Hello : I just send the message a few minutes ago regarding my FIFO is not being available. Now, the problem is as I can see that the module that writes to FIFO keeps it "tied up" until the FIFO is full, then stops writing to it since there is not any room left. Now, the rt-process that is supposed to read from this FIFO (separate module) can not get to it since the FIFO is "tied up" by the first module that is writing to it. Again, my question is 1. Can FIFOs be used in module-to-module communications or I must use shared memory ? 2. IF I can use FIFO in module-to-module communications how can I make it so the module that writes to a FIFO does not keep it from another module reading from the same fifo so the data is dequeued finally and FiFO does not get full Sincerely, Olga __ Olga Mill ([EMAIL PROTECTED]) Eastern Washington University Voice Mail : (509) 359-6907 __ -- [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] FIFO is not available
Hello, I am still having problem accessing one of my FIFOs. This FIFO was created by a real-time module, and it is write-only. Now, another real-time module is accessing it and tries to write to it. I get "Can't send a command to Real-time task" error no matter what I do. What makes me curious that I can access the same FIFO from a user program no problem. I know that FIFOs are pipes, and they have identifiers that should be accessible to any module that __did_not__open this particular FIFO ? Otherwise, how do I make sure that the FIFO that I am trying to access is not "tied up" by another module that has created it and may be using it ? Do I need to lock out critical sections so no 2 accesses are done simutaneously on the same FIFO or rt linux has a lock already ? Sincerely, Olga __ Olga Mill ([EMAIL PROTECTED]) Eastern Washington University Voice Mail : (509) 359-6907 __ -- [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] Hard disk
I'm trying to compile a RT-Linux Kernel (2.3-prep2-prepatched) on a computer already equiped with Mandrake 7.0 and Windows. The compilation is a succes and I can boot with my new RT-Linux. I can run KDE or not. But there is a BIG BUG!!! Not only have I ran a program (no matter the program) that the computer completly stops! It usully says that it can't find an adress. I wonder if my hard disk of 20 GO is not too big for RT-Linux so that it is sometimes completly lost. Moreover, when I reboot my computer after a brutal stop, I have noticed that RT-Linux is unabled to check my hard disk. Hower, Linux Mandrake can do that. Is it well known that RT-Linux doesn't bear big hard disk ? If it is right, should I install Linux at the beinning of the disk instead of Windows ? Thank you Kris -- [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_printk long long output
On Mon, Jul 31, 2000 at 01:32:33PM +0200, [EMAIL PROTECTED] wrote: > > My question is a silly one : how to do rt_printk() of gethrtime() return > > value. gethrtime() returns 64-bit signed integer (a long long int). > > I already tried %q (quad int), %L, and %ll but they won't work. > > No more than two months ago we discussed this topic > on the list. Check archive. > > The answer is: no longlong capability of printk() because > it would require 64 bit division. However your processor has > 32 bit arithmetic only and no math library linked with the kernel. > > Print the time in hex: > print("%.8x%.8x", (long)((time>>32)&0x), (long)(time&0x)); > A vsprintf() that handles %f and %lld would be a good candidate for a kernel module C library. It is pretty clear that a patch to the main kernel would not be accepted -- there isn't even a global macro to do long long division because Linus wants to remind everyone that using long long is crufty and bogus on the i386. 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] rthal struct define
On Mon, Jul 31, 2000 at 10:36:43AM -0500, daniel sheltraw wrote: > Hello RTAIers > > It looks like rthal is defined in the modified irq.c. When I try to > install a new SVAGlib I get a error that rthal is undefined which halts the > install. Why isn't rthal defined in a header file which > one could then #include in an include file of any new software > to be installed? > > Daniel You are running into a number of problems: 1. Your distribution uses symlinks from /usr/include/{linux|asm} to /usr/src/linux/include/{linux|asm}. This is wrong. Keep in mind that this has been wrong for about 5 years, but everyone *thinks* it is right because Red Hat does it. 2. SVGAlib assumes that kernel header files are acceptable for compiling a user-space program and/or library. This is also wrong. Notably, compiling SVGAlib against an SMP kernel will cause similar problems with undefined __global_cli and friends. 3. SVGAlib uses cli() in user-space. This is borderline stupid on SVGAlib's part. Unfortunately, due to the design of SVGAlib, this is required. (Borderline stupid == can cause lockups.) Anyway, what is wrong with using the SVGAlib binary that is packaged with your distribution? It will cause higher latency for real-time interrupts (because of cli() in user-space), but it works. Also, there are options other than SVGAlib, including using GGI, KGI, kernel framebuffer, or (my personal favorite) a stripped-down X server. 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] rt_printk long long output
NO! %ld is for a 32-bit long, not a 64-bit long-long. %lld is the printf (but not printk) format for the 64-bit long-long format. Norm > -Original Message- > From: Herve Lacheray [SMTP:[EMAIL PROTECTED]] > Sent: Monday, July 31, 2000 10:00 AM > To: Adi Sudewa > Cc: [EMAIL PROTECTED] > Subject: Re: [rtl] rt_printk long long output > > try: %ld > > On Mon, 31 Jul 2000, Adi Sudewa wrote: > > My question is a silly one : how to do rt_printk() of gethrtime() return > > value. gethrtime() returns 64-bit signed integer (a long long int). > > I already tried %q (quad int), %L, and %ll but they won't work. > > > > thanks in advance > > > > Adi Sudewa > > Teknik Informatika > > Institut Teknologi Bandung > > Bandung, Indonesia > > > > > > > > > > -- [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] --- > 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] --- 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] rthal struct define
Hello RTAIers It looks like rthal is defined in the modified irq.c. When I try to install a new SVAGlib I get a error that rthal is undefined which halts the install. Why isn't rthal defined in a header file which one could then #include in an include file of any new software to be installed? Daniel Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com -- [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_printk long long output
try: %ld On Mon, 31 Jul 2000, Adi Sudewa wrote: > My question is a silly one : how to do rt_printk() of gethrtime() return > value. gethrtime() returns 64-bit signed integer (a long long int). > I already tried %q (quad int), %L, and %ll but they won't work. > > thanks in advance > > Adi Sudewa > Teknik Informatika > Institut Teknologi Bandung > Bandung, Indonesia > > > > > -- [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] --- 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] printing long-long values in a driver
The function below illustrates how to print long-long values within a driver or module using printk() which doesn't support the 64-bit data format. Norm Dresner Fellow Systems Engineer Radar Systems Engineering Department Electronic Systems and Sensors Segment Northrop Grumman Corporation MS 520 Box 746 Baltimore MD 21203 Voice: (410) 993 - 2096Mornings; all-day voice-mail (410) 969 - 8068Afternoons with answering machine FAX:(410) 993 - 8084On-site (410) 969 - 8068Afternoons; call first to arrange E-Mail:Mornings:[EMAIL PROTECTED] Afternoons: [EMAIL PROTECTED] / * * * * Function to format a long-long datum as %016X* * This function is designed for small-endian CPUs * * like the Intel x86 series* * * * ENTRY * * char*FormatLongLongHex( llv )* * long long llv; * * * * RETURN * * Address of string containing formatted value * * * * NOTE * * Since this function uses two static buffers, * * no more than 2 calls to this function can be made* * within any one printk() call * * * * / char* FormatLongLongHex( long long llv ) { static charBuffer[34]; static int phase = 0; ulong *pul = (ulong*)&llv; char*buf = Buffer + (phase++ & 1 ? 17 : 0); sprintf( buf , "%08lX%08lX" , pul[1] , pul[0] ); return( buf ); } -- [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_printk long long output
That answer isn't totally true. I have a driver that's linked with the gcc-library for 64-bit math that's been running successfully for several months. In my RedHat 5.2 distribution with the 2.0.36 kernel, that library is found at /usr/lib/gcc-lib/i386-redhat-linux/ecgs-2..0.29/libgcc.a and I am using 64-bit division in the (real-time) driver many times a second. But I believe that the statement that printk() doesn't support long-long quantities is still true. Norm Dresner Fellow Systems Engineer Radar Systems Engineering Department Electronic Systems and Sensors Segment Northrop Grumman Corporation MS 520 Box 746 Baltimore MD 21203 Voice: (410) 993 - 2096Mornings; all-day voice-mail (410) 969 - 8068Afternoons with answering machine FAX:(410) 993 - 8084On-site (410) 969 - 8068Afternoons; call first to arrange E-Mail:Mornings:[EMAIL PROTECTED] Afternoons: [EMAIL PROTECTED] > -Original Message- > From: [EMAIL PROTECTED] [SMTP:[EMAIL PROTECTED]] > Sent: Monday, July 31, 2000 7:33 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: Re: [rtl] rt_printk long long output > > > My question is a silly one : how to do rt_printk() of gethrtime() return > > value. gethrtime() returns 64-bit signed integer (a long long int). > > I already tried %q (quad int), %L, and %ll but they won't work. > > No more than two months ago we discussed this topic > on the list. Check archive. > > The answer is: no longlong capability of printk() because > it would require 64 bit division. However your processor has > 32 bit arithmetic only and no math library linked with the kernel. > > Print the time in hex: > print("%.8x%.8x", (long)((time>>32)&0x), > (long)(time&0x)); > > Gabor > -- [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] --- 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] debugging a module
Dear all, I've tried to debug a large module put together from several source files. The sources were compiled separately then linked together using "partial linking" (ld -r). gdb commands work well on the basic source file (i.e. one where the debugged RT thread starts, it contains also init_module()). BUT, it is impossible to enter a different source file using gdb's step command. You may also set up a breakpoint on a function located in a different source file, but the execution does _not_ stop there. Any idea what could be wrong? Has anybody tried the same and found it working? Which version of RTL, gdb? Regards, pa -- .. 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] rt_printk long long output
> My question is a silly one : how to do rt_printk() of gethrtime() return > value. gethrtime() returns 64-bit signed integer (a long long int). > I already tried %q (quad int), %L, and %ll but they won't work. No more than two months ago we discussed this topic on the list. Check archive. The answer is: no longlong capability of printk() because it would require 64 bit division. However your processor has 32 bit arithmetic only and no math library linked with the kernel. Print the time in hex: print("%.8x%.8x", (long)((time>>32)&0x), (long)(time&0x)); Gabor -- [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_printk long long output
Hi, Thank you all for answering my previous questions. Now I do performance measurements of my real-time application. My question is a silly one : how to do rt_printk() of gethrtime() return value. gethrtime() returns 64-bit signed integer (a long long int). I already tried %q (quad int), %L, and %ll but they won't work. thanks in advance Adi Sudewa Teknik Informatika Institut Teknologi Bandung Bandung, Indonesia -- [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] Can a kernel real-time driver write/read from FIFO ?
> If one real-time module have created a FIFO with a read access, a user > application should be able to write to this FIFO . > What about another real-time module ? > Example > > /* rt-module1.c */ > . > rtf_create(READ_PIPE, SIZE_SND_PIPE); > ... > > /*rt-module2.c */ > ... > count = rtf_put( READ_PIPE , BUFFER ,(MSG).length ) ; > > Do I need to "open" this FIFO from the module2.c ? > You can not do an "open ()" call in the kernel space . No RT tasks open a FIFO but create. Once it is created any task can put/get any data into/from it. Gabor -- [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/