Re: [rtl] pci device driver

2002-02-10 Thread Norm Dresner
It all depends on what the device driver does. I've written device drivers that have both Real-Time and normal Linux portions which communicate via shared/global memory. Norm - Original Message - From: Michael Nielsen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, February

Re: [rtl] Long latency on laptop

2002-02-07 Thread Norm Dresner
Umm... What's that mean? Would you please translate the mysterious acronym SMM. TIA Norm - Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, February 07, 2002 1:22 PM Subject: Re: [rtl] Long latency on laptop Is all power saving and the

Re: [rtl] API to rtlinux programs

2002-01-28 Thread Norm Dresner
Depends. That is one way. Another is to wrap your rtlinux task with a normal linux device driver which can then communicate with users using ordinary read/write/ioctl functions. You'd need some way to notify the rtlinux task that there's something for it to do. If it's already a periodic

Re: [rtl] rtl_time module stops working

2002-01-28 Thread Norm Dresner
I can't help you solve your problem because I've never seen anything like that happen that wasn't my fault. What I can tell you is that for my periodic threads, I use pthread_create() followed by pthread_make_periodic_np() and in the while-loop, I suspend with rt_task_wait(). I've

Re: [rtl] Integer division of hrtime_t variables

2002-01-23 Thread Norm Dresner
Scan the archives. I've given the prescription a number of times for extracting this function from the gcc library and linking it with your program. Norm - Original Message - From: Pablo Alvarez [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, January 23, 2002 11:30 AM

Re: [rtl] rtlinux gcc 3.0.3

2002-01-16 Thread Norm Dresner
Well, from the preprocessor's point of view, () are extra tokens. What is being undefined is the string __cli, not the function __cli(). Perhaps earlier preprocessors have been more lenient in letting things like this through. Norm - Original Message - From: Massimiliano Cialdi

Re: [rtl] Should I setfp_np even I don't care about saving FPU state?

2001-12-21 Thread Norm Dresner
Are you running X-window? If so, there's probably be a large number of FP calculations you're unaware of. Any sound cards? Things like that are often stealth uses of resources. The real question isn't having your thread's FP registers saved for it, but the possibility that your thread my

Re: [rtl] make devices ?

2001-12-13 Thread Norm Dresner
- Original Message - From: Calin A. Culianu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, December 13, 2001 5:06 PM Subject: Re: [rtl] make devices ? You can write a small C program to essentially act as a wrapper to the mknod(2) system call. Then set this program to be

Re: [rtl] malloc, timers, and crashes.

2001-12-07 Thread Norm Dresner
Ken. Please don't think that I was advocating the abandonment of all thoughts of creating a real-time memory allocator under all possible sets of conditions -- No. What I was arguing was that it's impossible in general, that there is no one-size-fits-all. Many problems have finite

Re: [rtl] How can I use math function in RT module?

2001-12-07 Thread Norm Dresner
You can use some in rt-threads if you set the thread attribute to use_fp before the first time it uses the math coprocessor. The safest way to find out what math functions you can use is to extract the modules you want from the math library with the 'ar' command, then use objdump to see what

Re: [rtl] oneshot thread

2001-11-25 Thread Norm Dresner
- Original Message - From: Massimiliano Cialdi [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Sunday, November 25, 2001 5:29 AM Subject: Re: [rtl] oneshot thread Massimiliano Cialdi wrote: Norm Dresner wrote: If you have a 2 second deadline and a routine that takes, say

Re: [rtl] oneshot thread

2001-11-24 Thread Norm Dresner
If you have a 2 second deadline and a routine that takes, say, 150 milliseconds to execute, then set the sleep for 1.85 seconds and you'll meet your deadline. Unfortunately there is nothing that I've found any more sophisticated than this in RTLinux. Norm - Original Message - From:

[rtl] sending signals to user-threads

2001-11-24 Thread Norm Dresner
V3 of Real-Time Linux supports -- so the documentation says -- POSIX (kernel) pthreads and sending signals to (kernel) pthreads. The normal Linux kernel also supports a version of pthreads for user-tasks. Can a real-time Linux thread send a signal to a user-process/thread just by knowing its

Re: [rtl] accessing a module

2001-11-15 Thread Norm Dresner
I remember answering this a month ago but here's the answer again. 1. If by access runtime image of a module from another module you mean to access globally defined data or functions in one module from another, you have to use -- assuming you want an int variable called myData --

Re: [rtl] printfing floats

2001-11-14 Thread Norm Dresner
Changing the threads attributes to enable saving and restoring the state of the FP coprocessor doesn't change the function you call when you reference rtl_printf(). It's incapable of printing floating point without the attribute change and it remains incapable with it. There are several things

[rtl] Here's what I need. What's the easiest way to get there?

2001-11-14 Thread Norm Dresner
I need two features in RT-Linux that I had in AMX: 1. to wake up a sleeping task with a message. Message means nothing more than a copy of a byte string of some pre-defined length at an address specified by the caller. Thus structmystructreal_data = { 1 , 2 ... };

Re: [rtl] error in removing a module

2001-11-13 Thread Norm Dresner
The initial Segmentation Fault is undoubtedly due to some unexpected operation(s) in your own module. Once that happens during removal, the module is still in the kernel and in the state TERMINATING (or REMOVING or something similar). If it is in this state, it can't be removed because its

Re: [rtl] unresolved symbol atexit

2001-11-12 Thread Norm Dresner
What I would do at this point if I were faced with the problem is to write a hello-world program in user-space C++ and I would determine if atexit were being called in the startup. I would do this by one of three ways: 1. gdb 2. write a substitute in which I set a global flag if it was

Re: [rtl] unresolved symbols

2001-10-30 Thread Norm Dresner
fopen is a normal Linux user-space function which AFAIK is not available to any kernel-space task under any conditions. As I understand, you'll have to create a user-task to open the file and use it to send the data down to the kernel either via ioctl() or via an rtlinux FIFO. Norm -

[rtl] Problems with RDTSC examples posted here recently

2001-10-29 Thread Norm Dresner
There were (at least) three sample implementations of a C-function to read the Pentium's time-stamp counter. I originally implemented two and when I discovered a problem with the results of one, I implemented the third which was supposed to be an improved version of the second. The results of

[rtl] Follow-up: checking a pthread-ID

2001-10-25 Thread Norm Dresner
to a newer version of rtl? Thanks Norm - Original Message - From: Norm Dresner [EMAIL PROTECTED] To: rtlinux [EMAIL PROTECTED] Sent: Thursday, October 25, 2001 8:42 PM Subject: checking a pthread-ID According to the map-page, pthread_wakeup_np always returns a zero value

[rtl] checking a pthread-ID

2001-10-25 Thread Norm Dresner
According to the map-page, pthread_wakeup_np always returns a zero value and consequently can't be used to determine if the target thread in fact no longer exists. I have two questions: 1. What -- if anything -- will happen if the thread has been destroyed, i.e. either it has executed

Re: [rtl] communication between modules

2001-10-22 Thread Norm Dresner
No reason to apologize, your English is almost perfect. Anyway, there may be other means, but here are some: 1. Global variables. You can export symbols in the module that's loaded first and have each of the modules put into these variables what it wishes to share and take out what it needs

Re: [rtl] Locking Memory in Kernel

2001-10-17 Thread Norm Dresner
- Original Message - From: Calin A. Culianu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, October 17, 2001 6:30 PM Subject: Re: [rtl] Locking Memory in Kernel . Do the GFP_KERNEL and GFP_USER flags have any effect on this? YES. Best advice is to get Rubini's book or

Re: [rtl] Locking Memory in Kernel

2001-10-17 Thread Norm Dresner
Calin. No offense intended. I was just trying to point out that there are many resources out there which will answer all kinds of questions (basic and otherwise) about Linux kernel programming, and that I thought that the Rubini book was the best investment. Norm - Original Message

Re: [rtl] Maximum cycling frequency of 200Hz?

2001-10-15 Thread Norm Dresner
I've been running 1300 Hz on P-133 and PMMX-233 for billions of cycles with no observed deviation from the programmed frequency. On the P-133, my RT-kernel code takes about 40% of my CPU's bandwidth but it seems to be less than 10% on the PMMX-233. What do you have your thread doing?

Re: [rtl] Can anyone explain why this happened?

2001-10-12 Thread Norm Dresner
Oct 2001, Norm Dresner wrote: Inside a function called by a real-time task, I coded a simple routine to read the contents from a port. Because I wanted not to even try to read from the address if the corresponding board wasn't there, I put an if-statement in front of the i/o read

[rtl] Can anyone explain why this happened?

2001-10-11 Thread Norm Dresner
Inside a function called by a real-time task, I coded a simple routine to read the contents from a port. Because I wanted not to even try to read from the address if the corresponding board wasn't there, I put an if-statement in front of the i/o read. The code I wanted to write was: ...

Re: [rtl] fp-how?

2001-10-02 Thread Norm Dresner
Alternately, if you know the approximate range of the number -- you do know the approximate range of the number, don't you? -- you can do some integer math and compute the integer and fractional parts and create an ASCII representation that way. Norm - Original Message - From:

Re: [rtl] RT-Linux patch proposal for RTF size queryage

2001-09-30 Thread Norm Dresner
- Original Message - From: Calin A. Culianu [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, September 29, 2001 9:24 PM Subject: Re: [rtl] RT-Linux patch proposal for RTF size queryage On Fri, 28 Sep 2001, Victor Yodaiken wrote: You're welcome to send a patch and your tone

Re: [rtl] doubt regd library calls

2001-09-19 Thread Norm Dresner
Not quite. There is a big difference between Library Calls and System Calls. Some Library calls are nothing much more than calls to your own functions. System Calls are what you're referring to. There are library calls that are safe to make and library calls that call system calls that are

Re: [rtl] doubt regd library calls

2001-09-17 Thread Norm Dresner
If the function is listed in the documentation as having an RT-Linux version then you are not calling the real user-space routine but an RT-Linux one that has (approximately) the same description and calling sequence. You should never call user-space functions (unless you really know what you

Re: [rtl] accessing external devices from rtl

2001-08-30 Thread Norm Dresner
Peter. I think you'll still need to use ioremap() to get a virtual address with which to access the memory -- and don't forget to iounmap() afterwards. If you don't have a copy of Rubini's book, Linux Device Drivers, the QD account is VirtualAddress = ioremap( PhysicalAddress , size );

Re: [rtl] port Linux device driver to RTLinux-any book?

2001-08-30 Thread Norm Dresner
Exactly what do you mean by port it to rtl? (notice that CAPS are unnecessary). If all you want to do is run this driver as a linux driver on an rtl-enhanced computer, then there's nothing to do. If you want it to be a real-time driver, then you'll probably have a lot of work. Norm -

Re: [rtl] Need Board Recommendations - ADC, Serial I/O

2001-08-27 Thread Norm Dresner
I'll second the problem of using an A-to-D card with a mux. I've had several projects where I've had to use a PC-Labs PCL-818 High Speed Data Acquisition Card. I found that to get complete settling of the mux takes over a millisecond -- an eternity compared to the 3-5 microseconds conversion

Re: [rtl] user space program hangs

2001-08-22 Thread Norm Dresner
I'll second the notion that there are no real problems with fwvm(2) which I used with RTL v1 for over a year with no noticeable degradation. If -- and this is a big IF that I'm going to have to investigate -- the only problem with the Gnome desktop is with the automount features, they can be

Re: [rtl] Examples and such

2001-08-20 Thread Norm Dresner
PROTECTED] To: Norm Dresner [EMAIL PROTECTED] Cc: rtlinux, [EMAIL PROTECTED] Sent: Sunday, August 19, 2001 7:18 AM Subject: Re: [rtl] Examples and such So examples/v1api/frank doesn't compile? Did you enable CONFIG_RTL_USE_V1_API and recompile RTL? Norm Dresner ([EMAIL PROTECTED]) wrote: Okay

Re: [rtl] Mailing list missing some messages

2001-08-17 Thread Norm Dresner
On Friday 17 August 2001 01:31, Calin Culianu wrote: Hey, what are people doing running MS software anyway? :) Dunno. Maybe they have better nerves than we have? (Not that that would make it possible to do anything *really* interesting...) ;-))) It's not totally my choice at work

Re: [rtl] which timer does RTLinux use?

2001-08-16 Thread Norm Dresner
For the x86 architecture, AIUI, the frequencies have to be expressed relative to the motherboard oscillator (1.19...MHz) so I'd guess that sets the resolution. Norm - Original Message - From: fred august [EMAIL PROTECTED] To: rtl [EMAIL PROTECTED] Sent: Thursday, August 16, 2001

Re: [rtl] kernel compile problem

2001-08-04 Thread Norm Dresner
What version of Linux (and gcc) are you using? Norm - Original Message - From: Dan Peters [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 03, 2001 12:36 PM Subject: [rtl] kernel compile problem Can somebody tell me why I always get the following error when trying to

Re: [rtl] using the sin function in rtlinux

2001-08-03 Thread Norm Dresner
AIUI, the math coprocessor on an x86 CPU can be used in an RTL-module by declaring that it uses FP math. I don't believe that there are these kinds of restrictions in other architectures. Norm - Original Message - From: Theo ten Brummelaar [EMAIL PROTECTED] To: [EMAIL PROTECTED]

[rtl] Examples and such

2001-08-01 Thread Norm Dresner
. The errors I get there are similar to (some of) what I see in my own program so I feel that if I can get past frank, I'll be a long way toward getting my program compiled too. All help is appreciated. BTW, the system is RH 6.2 w/2.2.18 and RTL 3.0 Norm Dresner Fellow Systems Engineer

Re: [rtl] problems with mmap and read/write on /proc

2001-07-28 Thread Norm Dresner
Dean. While I understand that you're trying to port software with as few changes as possible, I don't see why using RTLinux shared memory (not Linux shared memory) wouldn't give you the functionality you need. Norm - Original Message - From: Dean W. Anneser [EMAIL PROTECTED] To:

Re: [rtl] Can't Unload Modules - in use

2001-06-01 Thread Norm Dresner
Janet, Here's the output from the lsmod command on my system here: Module Size Used by lvi 130360 rtl_sched 40936 0 (lvi) rtl_time10164 0 [rtl_sched] rtl25984 0 [rtl_sched rtl_time] The only order that will work is rmmod

Re: rtl-digest V1 RE: [rtl] Problems Dual Booting (RT)Linux

2001-03-27 Thread Norm Dresner
I've tried to dual boot RTL 3.0 over Linux 2.2.18 and RTL 0.9 over 2.0.36. While I can boot both systems, I can't access (that is load) the modules in the "2nd" system. [In this context, the first system is the one whose LILO I've last run and the second system is the other.] I'm almost

Re: [rtl] Real-Time development environment

2000-07-26 Thread Norm Dresner
1. The more things can be standardized, the less they have to be reinvented with each new implementation. I approve of /usr/lib/xxx where xxx is something mnemonic. I've already done that for each major project I have on my development machines. 2. I have my own "standard" header files. For