rtl-digest Tuesday, November 6 2001 Volume 01 : Number 139
----------------------------------------------------------------------
Date: Mon, 5 Nov 2001 14:58:15 -0500
From: "Norm Dresner" <[EMAIL PROTECTED]>
Subject: Re: [rtl] runtime image of module
Before anyone even begins to think about answering the
question, we'd need to know why you want this information
and how much you already understand about the kernel's
internal architecture so the answer can be tailored
appropriately.
Norm
- ----- Original Message -----
From: Calin A. Culianu <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, November 05, 2001 11:29 AM
Subject: Re: [rtl] runtime image of module
> On Sun, 4 Nov 2001, A V wrote:
> >
> > Hi all,
> >
> > I want to know how the runtime image of a will
> > be.i.e where the stack will be and bss . Can somebody
> > help me.
>
> All modules run in kernel space. This means that the
address space of a
> running module is the same logical address space that the
kernel itself
> uses -- this is because a module IS the kernel. Memory
for modules is
> cleanly allocated during the module's creation and
cleanly free'd during
> the module's destruction. (with the exception for memory
the module itself
> explicitly allocates using kmalloc).
>
> As far as stacks go: Well, that depends... you may have
several stacks if
> you go and create yourself several threads inside your
module. The other
> data and code segments and such all get allocated by the
kernel in kernel
> space via kmalloc probably during the create_module()
system call. For
> more info, module.c in the kernel/ subtree of the linux
source tree can
> answer many of your questions... :)
>
> As for where exactly stacks come from in the linux kernel
when tasks run
> on behalf of users or during bottom-halves of drivers:
that's a good
> question. I would imagine that actually there are fewer
kernel stacks than
> there are kernel tasks. Most of the time tasks spend
their time running
> in user mode, where they get their own user stacks.. as
for when they run
> in kernel mode during system calls, they probably get
these temporary
> stacks that go away completely as soon as the system call
returns to user
> mode.
>
> I kind of wish I knew more about the kernel and the
relationship between
> different threads of execution and dedicated kernel
tasks.... Oh well..
> maybe someone else can shed more light on this matter...
>
> -Calin
>
>
>
>
> >
> > Regards
> > Venkat
- -- [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/
------------------------------
Date: Mon, 5 Nov 2001 12:30:52 -0800
From: [EMAIL PROTECTED]
Subject: Re: [rtl] Low Cost Term Life Insurance XMUM
>don�t spam me again !!!!, i�am not interessted in your fucking insurance
>[EMAIL PROTECTED] wrote:
>>
>>
>> Term Quotes Life Insurance Companies
>>
>>
>>
>>
>>
>>
>>
>> Since 1996, term life insurance rates have been reduced by as much as 70%
>>
>> 40 year old male - $250,000 - 10 year level term
>> As low as $10.44 per month!
>>
>> At TermQuotes Life Insurance Companies of America, we will survey the
>> top life insurance companies for you and provide you with the best rates
>> available. The quote is free. There is no obligation to buy. Compare the
>> rates and see for yourself. Fill out this quick form below for further
>> information.
>>
>> Results of computer survey 07-09-01
>> Sample Annual Premiums
>> * 10 Year Level Premium Term Rates *
>> Age $250,000 $500,000 $1,000,000
>> 35 $115 $175 $305
>> 45 $210 $375 $670
>> 55 $500 $935 $1,370
>> 65 $1,305 $2,550 $4,920
>> 70 $2,265 $4,480 $7,510
>>
>>
>> *Above rates guaranteed to remain level for 10 years
>> Rates based on male preferred class 1 non-smoker
>> Policies are guaranteed renewable to age 95
>> Policies with 15, 20, 25, and 30 year level premiums also available
>>
>> Attention All Smokers,
>> you may qualify for special reduced smoker rates!
>>
>> Universal Life, Second-to-Die and Estate Planning products also provided.
>>
>> Submit This Form for a Free Term Insurance Quote!
>>
>> Name Insured:
>> Amount of Coverage:
>> Date of Birth: Month Day Year
>> Sex: Male Female
>> Height: FT in
>> Weight: lbs.
>> Occupation:
>> xxx
>> Have You Ever Had:
>> High Blood Pressure Yes No
>> Heart Attack or Stroke Yes No
>> Cancer Yes No
>> Diabetes Yes No
>> Mother, Father, Sister, Brother Diagnosed or Died of Cancer or
>> Cardiovascular Disease Before Age 60 Yes No
>> Have You Smoked Within the Last 12 Months Yes No
>> xxx
>> Person Completing Request:
>> Mailing Address:
>> City: State Zip
>> Daytime Phone:
>> Evening Phone:
>> Email Address:
>> Best time to contact:
>>
>> When you click submit it may start your spell check, so please click
>> "Ignore" if it does.
>>
>>
>> YOUR INTERNET ADVERTISING
>> Copyright�FFFFA92000-2001 . All Rights Reserved
>>
>> This could be your ad!
>>
>> Email Us <mailto:[EMAIL PROTECTED]?subject=Direct Marketing
>> Inquiry> with your name and a good phone number to reach you.
>>
>> If you think, that you will not benefit from this correspondence, please
>> click here. <http://www.removeyou.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/
>--
>Thomas Sauter Tel. 06221/75933-15
>20/10 Perfect Vision [EMAIL PROTECTED]
>Waldhofer Str. 100
>D-69123 Heidelberg
>-- [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/
*** Your message did not reach its recipient ***
It was caught by the mailing system as spam.
If this message is not spam and you feel that
this message was caught in error, please email
a note to [EMAIL PROTECTED]
If this message is spam, knock it off!
This server is in California where it is illegal
to spam! We do not accept spam here!
We will go after all spammers to the maximum
extent of the law!
- -- [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/
------------------------------
Date: Mon, 5 Nov 2001 19:41:08 -0800
From: [EMAIL PROTECTED]
Subject: Re: [rtl] Low Cost Term Life Insurance XMUM
>>don�t spam me again !!!!, i�am not interessted in your fucking insurance
>>[EMAIL PROTECTED] wrote:
>>>
>>>
>>> Term Quotes Life Insurance Companies
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> Since 1996, term life insurance rates have been reduced by as much as 70%
>>>
>>> 40 year old male - $250,000 - 10 year level term
>>> As low as $10.44 per month!
>>>
>>> At TermQuotes Life Insurance Companies of America, we will survey the
>>> top life insurance companies for you and provide you with the best rates
>>> available. The quote is free. There is no obligation to buy. Compare the
>>> rates and see for yourself. Fill out this quick form below for further
>>> information.
>>>
>>> Results of computer survey 07-09-01
>>> Sample Annual Premiums
>>> * 10 Year Level Premium Term Rates *
>>> Age $250,000 $500,000 $1,000,000
>>> 35 $115 $175 $305
>>> 45 $210 $375 $670
>>> 55 $500 $935 $1,370
>>> 65 $1,305 $2,550 $4,920
>>> 70 $2,265 $4,480 $7,510
>>>
>>>
>>> *Above rates guaranteed to remain level for 10 years
>>> Rates based on male preferred class 1 non-smoker
>>> Policies are guaranteed renewable to age 95
>>> Policies with 15, 20, 25, and 30 year level premiums also available
>>>
>>> Attention All Smokers,
>>> you may qualify for special reduced smoker rates!
>>>
>>> Universal Life, Second-to-Die and Estate Planning products also provided.
>>>
>>> Submit This Form for a Free Term Insurance Quote!
>>>
>>> Name Insured:
>>> Amount of Coverage:
>>> Date of Birth: Month Day Year
>>> Sex: Male Female
>>> Height: FT in
>>> Weight: lbs.
>>> Occupation:
>>> xxx
>>> Have You Ever Had:
>>> High Blood Pressure Yes No
>>> Heart Attack or Stroke Yes No
>>> Cancer Yes No
>>> Diabetes Yes No
>>> Mother, Father, Sister, Brother Diagnosed or Died of Cancer or
>>> Cardiovascular Disease Before Age 60 Yes No
>>> Have You Smoked Within the Last 12 Months Yes No
>>> xxx
>>> Person Completing Request:
>>> Mailing Address:
>>> City: State Zip
>>> Daytime Phone:
>>> Evening Phone:
>>> Email Address:
>>> Best time to contact:
>>>
>>> When you click submit it may start your spell check, so please click
>>> "Ignore" if it does.
>>>
>>>
>>> YOUR INTERNET ADVERTISING
>>> Copyright�FFFFA92000-2001 . All Rights Reserved
>>>
>>> This could be your ad!
>>>
>>> Email Us <mailto:[EMAIL PROTECTED]?subject=Direct Marketing
>>> Inquiry> with your name and a good phone number to reach you.
>>>
>>> If you think, that you will not benefit from this correspondence, please
>>> click here. <http://www.removeyou.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/
>>--
>>Thomas Sauter Tel. 06221/75933-15
>>20/10 Perfect Vision [EMAIL PROTECTED]
>>Waldhofer Str. 100
>>D-69123 Heidelberg
>>-- [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/
>*** Your message did not reach its recipient ***
>It was caught by the mailing system as spam.
>If this message is not spam and you feel that
>this message was caught in error, please email
>a note to [EMAIL PROTECTED]
>If this message is spam, knock it off!
>This server is in California where it is illegal
>to spam! We do not accept spam here!
>We will go after all spammers to the maximum
>extent of the law!
>-- [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/
*** Your message did not reach its recipient ***
It was caught by the mailing system as spam.
If this message is not spam and you feel that
this message was caught in error, please email
a note to [EMAIL PROTECTED]
If this message is spam, knock it off!
This server is in California where it is illegal
to spam! We do not accept spam here!
We will go after all spammers to the maximum
extent of the law!
- -- [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/
------------------------------
Date: Tue, 6 Nov 2001 02:14:01 -0800
From: [EMAIL PROTECTED]
Subject: Re: [rtl] Low Cost Term Life Insurance XMUM
>>>don�t spam me again !!!!, i�am not interessted in your fucking insurance
>>>[EMAIL PROTECTED] wrote:
>>>>
>>>>
>>>> Term Quotes Life Insurance Companies
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Since 1996, term life insurance rates have been reduced by as much as 70%
>>>>
>>>> 40 year old male - $250,000 - 10 year level term
>>>> As low as $10.44 per month!
>>>>
>>>> At TermQuotes Life Insurance Companies of America, we will survey the
>>>> top life insurance companies for you and provide you with the best rates
>>>> available. The quote is free. There is no obligation to buy. Compare the
>>>> rates and see for yourself. Fill out this quick form below for further
>>>> information.
>>>>
>>>> Results of computer survey 07-09-01
>>>> Sample Annual Premiums
>>>> * 10 Year Level Premium Term Rates *
>>>> Age $250,000 $500,000 $1,000,000
>>>> 35 $115 $175 $305
>>>> 45 $210 $375 $670
>>>> 55 $500 $935 $1,370
>>>> 65 $1,305 $2,550 $4,920
>>>> 70 $2,265 $4,480 $7,510
>>>>
>>>>
>>>> *Above rates guaranteed to remain level for 10 years
>>>> Rates based on male preferred class 1 non-smoker
>>>> Policies are guaranteed renewable to age 95
>>>> Policies with 15, 20, 25, and 30 year level premiums also available
>>>>
>>>> Attention All Smokers,
>>>> you may qualify for special reduced smoker rates!
>>>>
>>>> Universal Life, Second-to-Die and Estate Planning products also provided.
>>>>
>>>> Submit This Form for a Free Term Insurance Quote!
>>>>
>>>> Name Insured:
>>>> Amount of Coverage:
>>>> Date of Birth: Month Day Year
>>>> Sex: Male Female
>>>> Height: FT in
>>>> Weight: lbs.
>>>> Occupation:
>>>> xxx
>>>> Have You Ever Had:
>>>> High Blood Pressure Yes No
>>>> Heart Attack or Stroke Yes No
>>>> Cancer Yes No
>>>> Diabetes Yes No
>>>> Mother, Father, Sister, Brother Diagnosed or Died of Cancer or
>>>> Cardiovascular Disease Before Age 60 Yes No
>>>> Have You Smoked Within the Last 12 Months Yes No
>>>> xxx
>>>> Person Completing Request:
>>>> Mailing Address:
>>>> City: State Zip
>>>> Daytime Phone:
>>>> Evening Phone:
>>>> Email Address:
>>>> Best time to contact:
>>>>
>>>> When you click submit it may start your spell check, so please click
>>>> "Ignore" if it does.
>>>>
>>>>
>>>> YOUR INTERNET ADVERTISING
>>>> Copyright�FFFFA92000-2001 . All Rights Reserved
>>>>
>>>> This could be your ad!
>>>>
>>>> Email Us <mailto:[EMAIL PROTECTED]?subject=Direct Marketing
>>>> Inquiry> with your name and a good phone number to reach you.
>>>>
>>>> If you think, that you will not benefit from this correspondence, please
>>>> click here. <http://www.removeyou.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/
>>>--
>>>Thomas Sauter Tel. 06221/75933-15
>>>20/10 Perfect Vision [EMAIL PROTECTED]
>>>Waldhofer Str. 100
>>>D-69123 Heidelberg
>>>-- [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/
>>*** Your message did not reach its recipient ***
>>It was caught by the mailing system as spam.
>>If this message is not spam and you feel that
>>this message was caught in error, please email
>>a note to [EMAIL PROTECTED]
>>If this message is spam, knock it off!
>>This server is in California where it is illegal
>>to spam! We do not accept spam here!
>>We will go after all spammers to the maximum
>>extent of the law!
>>-- [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/
>*** Your message did not reach its recipient ***
>It was caught by the mailing system as spam.
>If this message is not spam and you feel that
>this message was caught in error, please email
>a note to [EMAIL PROTECTED]
>If this message is spam, knock it off!
>This server is in California where it is illegal
>to spam! We do not accept spam here!
>We will go after all spammers to the maximum
>extent of the law!
>-- [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/
*** Your message did not reach its recipient ***
It was caught by the mailing system as spam.
If this message is not spam and you feel that
this message was caught in error, please email
a note to [EMAIL PROTECTED]
If this message is spam, knock it off!
This server is in California where it is illegal
to spam! We do not accept spam here!
We will go after all spammers to the maximum
extent of the law!
- -- [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/
------------------------------
Date: Tue, 06 Nov 2001 07:36:12 -0500
From: Mark Hounschell <[EMAIL PROTECTED]>
Subject: [rtl] Newbie ?
I/we have an app (heavily threaded) that is an emulation of a proprietary
real-time OS. We have recently ported it to linux. It requires a number of pci
cards that have been designed
to accomodate some of the hardware that this proprietary OS ran on. The linux
drivers for these are mostly complete and working. We have found by way of
interrupt latency/determinism
tests that run under the emulated OS and on the native hardware/proprietary OS
that the determinism numbers we get under the emulation are quite poor compared
to the real/native environment. I'm sure this is no suprise to anyone, even us.
It was expected. In the native
environment from interrupt time to user code start time (latency) we get 60us
with a variance
of 1us (determinism). I know 60us isn't so greate, it was for it's time though,
but the 1us
variance is excelant and what we need. The numbers for the same tests run on a
dual 1.7gz p4 zeon are about 50us latency but the determism depends on alot of
things. If we run the app
in single user mode the variance (determinism) numbers are almost exceptable
(but not really).
They end up around 100us in single user mode. They are 2-45 ms with X running
which is crazy.
A simple move of the mouse causes the numbers to go into never never land. With
no X (run level 3) the numbers are better but still very unexceptable.
Why I am posting is, we want to try rtlinux to see what it gets us. I have
installed the 3.1
version for the 2.4.4 kernel and did the suggested method of making mk.rtl
available to our
makefiles for the app compile. It didn't change anything. I need to figure out
if there is an
easy way to make our app look like real-time to rtlinux. I've looked at the
rtlinux API and
many of the stanard linux calls are available and I assume they are different
but with the
same names. I'm not a C programmer. I'm an old fortran/assembler guy from the
days of this
old proprietary OS. IS there an easy way for me to try rtlinux for this app such
that it doesn't have to be rewritten. What about our drivers that we had to
write for linux? Is there
anything that will have to be done to them? Does one have to be a linux kernel
hacker to make an app run in real-time under rtlinux? Is there an easy way to
test this to see if it's what
we need?
Any help or suggestions appreciated
Thank in advance and sorry for the rambling.
Regards
mark
- --
Mark Hounschell
[EMAIL PROTECTED]
- -- [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/
------------------------------
Date: Tue, 6 Nov 2001 15:15:46 +0100
From: "Stephane GALLES - Syntegra FR" <[EMAIL PROTECTED]>
Subject: [rtl] 16Ko limit with rt_com ?
I try to send data (an array of 'double')
from a PC to an other, using a Null-Modem
cable.
I've modified the rtlinux COM driver to be able to
wake up a thread each time an interrupt is triggered, because
the target must get the data as soon as they are arrived.
actually the thread that reads the data is in an other module, and the custom
isr handler is called thrue a fonction pointer :
So in rt_linux.c I wrote :
- -------------------------------------------------------------------------
static unsigned int rt_com0_isr( unsigned int num, struct pt_regs *r)
{
unsigned int ret = rt_com_isr(0, NULL);
if (custom_isr_handler)
{
custom_isr_handler();
}
return ret;
}
- -------------------------------------------------------------------------
and in the module that reads the data we find :
- -------------------------------------------------------------------------
static void my_isr_handler(void){
pthread_wakeup_np(thread_app);
}
- -------------------------------------------------------------------------
with custom_isr_handler = my_isr_handler (initialized when the module that
reads the data is loaded).
the thread 'thread_app' reads available data each time it is waken up,
with a rt_com_read.
I send my data from COM1 to COM0 with a user space program that sends these data
continously, with no pause.
The rtlinux driver wait for the data on COM0, and wakeup my thread that reads
the data
Everything is OK if the total amount of sent data does not exced 16Ko
I get all my data, even with a 115200Bd rate.
But, when I try to send more than 16Ko, it seems that the data above 16Ko are
lost : the handler is called, the tread is waken up, the rt_com_read function
is called and returns 8 (so 8 chars must have been received), but the chars
in the buffer filled by rt_com_read are all equal to 0.
The user space program I uses to send my doubles :
(I'm sorry for the french language used for some variables)
- ------------------------------------------------------------------------
include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <termios.h>
#define BAUD_RATE B115200
/*
- ----------------------
- ----------------------
here is the 16Ko limit
2050 works, 2055 fails) :
- ----------------------
- ----------------------
*/
#define NOMBRE_DOUBLE 2054
const char *DEVICE = "/dev/ttyS1";
int
main (int ac, char **av)
{
int fd, i, n;
struct termios tty;
double d = 1;
double swap = 1;
double cumul = 0;
int taille_restante;
double source;
if ((fd = open (DEVICE, O_RDWR | O_NOCTTY | O_NDELAY)) < 0)
{
perror (DEVICE);
exit (1);
}
else
{
tcgetattr (fd, &tty);
cfsetispeed (&tty, BAUD_RATE);
cfsetospeed (&tty, BAUD_RATE);
tcsetattr (fd, TCSANOW, &tty);
tcgetattr (fd, &tty);
tty.c_cflag |= (CLOCAL | CREAD);
tcsetattr (fd, TCSANOW, &tty);
tcgetattr (fd, &tty);
tty.c_cflag &= ~PARENB;
tcsetattr (fd, TCSANOW, &tty);
tcgetattr (fd, &tty);
tty.c_cflag &= ~CSTOPB;
tcsetattr (fd, TCSANOW, &tty);
tcgetattr (fd, &tty);
tty.c_cflag &= ~CSIZE;
tcsetattr (fd, TCSANOW, &tty);
tcgetattr (fd, &tty);
tty.c_cflag |= CS8;
tcsetattr (fd, TCSANOW, &tty);
for (i = 0; i < NOMBRE_DOUBLE; i++)
{
if (i != NOMBRE_DOUBLE - 1)
{
source = i + 1;
cumul = cumul + swap * source;
swap *= (-1);
}
else
/* the lastest value will be 1000000*/
source = 1000000;
}
taille_restante = sizeof (double);
do
{
n = write (fd,
(char *) (&source) +
(sizeof (double) -
taille_restante),
taille_restante);
if (n > 0)
{
taille_restante -= n;
printf ("Element=%d n=%d\n",
(int) source, n);
}
}
while (taille_restante);
}
printf ("Element envoyes : %d, CUMUL=%d\n", NOMBRE_DOUBLE,
(int) cumul);
close (fd);
}
return 0;
}
- ------------------------------------------------------------------------
And, the module that reads the data :
(I uses the value 1000000 to catch the
lastest double (but, when it fails,I never get
1000000, I get 0...) )
rt_com_set_isr_handler is a function I added to the rt_com
driver. It allow to dynamically register your own function for isr
Sorry again for the french stuff everywhere...
- --------------------------------------------------------------------------
#include <rtl.h>
#include <rtl_fifo.h>
#include <time.h>
#include <pthread.h>
#include <asm/io.h>
#include "rt_com.h"
#define BAUD_RATE 115200
static void* func_app(void* param);
static void my_isr_handler(void);
static pthread_t thread_app = 0;
static int stop_thread_app = 0;
static void my_isr_handler(void)
{
pthread_wakeup_np(thread_app);
}
int init_module(void)
{
struct sched_param p;
pthread_attr_t attr;
rtl_printf ("Mise en place des parametres du port serie\n");
rt_com_setup(0, BAUD_RATE, RT_COM_PARITY_NONE, 1, 8);
rtl_printf ("tentative de demarrage du thread de lecture des parameters\n");
pthread_attr_init(&attr);
pthread_attr_setfp_np(&attr, 1);
pthread_create (&thread_app, &attr, func_app, NULL);
p . sched_priority = 1;
pthread_setschedparam (thread_app, SCHED_FIFO, &p);
rtl_printf ("Mise en place du handler d'IRQ\n");
rt_com_set_isr_handler(my_isr_handler);
return 0;
}
void cleanup_module(void)
{
stop_thread_app = 1;
pthread_wakeup_np(thread_app);
pthread_join(thread_app, NULL);
rtl_printf ("Suppression du handler d'IRQ\n");
rt_com_set_isr_handler(0);
rtl_printf ("Suppression des parametres du port serie\n");
rt_com_setup(0, -1, 0, 0, 0);
}
static void *func_app(void* param)
{
int n,i =0;
double swap = 1;
double cumul = 0;
double target = 0;
int taille_restante;
int progression = 0;
int dernier_element_valide =0;
rtl_printf( "Demarrage du Thread de lecture du port s�rie.\n" );
taille_restante = sizeof(double);
pthread_suspend_np(pthread_self());
while(!stop_thread_app)
{
n = rt_com_read(0, (char*)(&target)+(sizeof(double)-taille_restante),taille_restante);
if (n > 0)
{
taille_restante -= n;
rtl_printf("r=%d\n",taille_restante);
}
if( 0 == taille_restante)
{
taille_restante = sizeof(double);
rtl_printf("t=%d\n",(int)target);
i++;
if(target != 1000000)
{
cumul = cumul + swap * target;
swap *=(-1);
}
else
{
rtl_printf("Element recus=%d CUMUL = %d\n", i, (int)cumul);
swap = 1;
cumul = 0;
i = 0;
}
}
pthread_suspend_np(pthread_self());
}
rtl_printf("Fin du Thread de lecture du port s�rie.\n" );
return 0;
}
- -------------------------------------------------------------------------
Any idea for this problem ?
L'int�grit� de ce message n'�tant pas assur�e sur Internet, SYNTEGRA ne peut �tre tenu
responsable de son contenu.
Si vous n'�tes pas destinataire de ce message confidentiel, merci de le d�truire et
d'avertir imm�diatement l'exp�diteur.
The integrity of this message cannot be guaranteed on the Internet. SYNTEGRA can not
therefore be considered responsible for the contents.
If you are not the intended recipient of this confidential message, then please delete
it and notify immediatly the sender.
- -- [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/
------------------------------
Date: Tue, 6 Nov 2001 09:54:20 -0500
From: "Dresner, Norman A." <[EMAIL PROTECTED]>
Subject: RE: [rtl] use of RT Fifo leads to IRQ be lost RTL 2.2
While you might not want a real-time FIFO to interfere with IRQ latency,
consider that the RT-kernel has to copy the a large amount of data from your
buffer into its buffer in a way that guarantees the atomicity of the
operation -- most likely , with interrupts disabled. Similarly the
operation of reading it out of the FIFO at the user-task's end requires the
full overhead of a system call and then the copy of an equal amount of data
from the FIFO's internal buffer into the user's buffer, again with some
guarantee of atomicity. While there might be a similar number of copy
operations when your ISR writes it into shared memory and the user reads it
out, the time when the interrupts are disabled can be reduced to the time to
acquire and release some sort of mutex which controls the simulated FIFO in
shared memory; once the pointers are acquired atomically, memory transfer
can proceed as a normal operation -- and it's possible that the user-task
doesn't need to copy the data out of shared memory but can use it in place,
thus saving even more CPU bandwidth
Norm
> -----Original Message-----
> From: G�rard LASSAILLY [SMTP:[EMAIL PROTECTED]]
> Sent: Thursday, November 01, 2001 7:49 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [rtl] use of RT Fifo leads to IRQ be lost RTL 2.2
>
> Thanks for your reply.
>
> I also think that using shared memory is THE solution to move large block
> of
> data between user space and RT LINUX.
>
> But, I think that the use of RT Fifo should not affect IRQ latency on a
> Real
> Time OS (a can see on my oscilloscope IRQ latency > 1ms !!! when i'm using
> rtl_put() with 1,5 Mbytes under RTL2.2 / kernel 2.2.14 / Pentium 266 MMX).
>
> Somebody know if change have been made on RT FIFO code ( RTL 2.2 -> RTL
> 3.1)
> to reduce IRQ latency?
>
> G�rard
>
> ----- Original Message -----
> From: "Norm Dresner" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, October 31, 2001 2:51 AM
> Subject: Re: [rtl] use of RT Fifo leads to IRQ be lost RTL 2.2
>
>
> > This doesn't seem like a good design to me. Why can't you
> > write the data to shared memory (very fast) and just send a
> > pointer through the FIFO telling the user-task where it can
> > find the data.
> >
> > Norm
> >
> > ----- Original Message -----
> > From: G�rard LASSAILLY
> > To: [EMAIL PROTECTED]
> > Sent: Tuesday, October 30, 2001 4:47 PM
> > Subject: [rtl] use of RT Fifo leads to IRQ be lost RTL 2.2
> >
> >
> > I'm using 4 RT Fifo under RT Linux 2.2.
> > I write blocs of 1.4 Mbytes in RT FIFO (1.4 Mbytes by
> > rtf_put() ).
> > This write in RT Fifo is repeat 25 times by second.
> >
> > During this, IRQ are lost or delayed.
> >
> > I don't use RT Fifo in ISR but only to communicate between
> > RT task and user task under LINUX.
> >
> > I think that IRQ are masked during rtf_put() during a long
> > time.
> >
> > Some knowledge please ?
> > Do you know if RT Linux 3.0 or 3.1 workaround this
> > probleme?
> >
> > Thanks for your reply.
> >
> > -- [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/
> >
>
> -- [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/
- -- [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/
------------------------------
Date: Tue, 6 Nov 2001 19:05:42 +0100
From: David Olofson <[EMAIL PROTECTED]>
Subject: Re: [rtl] Newbie ?
On Tuesday 06 November 2001 13:36, Mark Hounschell wrote:
> I/we have an app (heavily threaded) that is an emulation of a
> proprietary real-time OS. We have recently ported it to linux. It
> requires a number of pci cards that have been designed
> to accomodate some of the hardware that this proprietary OS ran on. The
> linux drivers for these are mostly complete and working. We have found
> by way of interrupt latency/determinism
> tests that run under the emulated OS and on the native
> hardware/proprietary OS that the determinism numbers we get under the
> emulation are quite poor compared to the real/native environment. I'm
> sure this is no suprise to anyone, even us. It was expected. In the
> native
> environment from interrupt time to user code start time (latency) we
> get 60us with a variance
> of 1us (determinism). I know 60us isn't so greate, it was for it's time
> though, but the 1us
> variance is excelant and what we need. The numbers for the same tests
> run on a dual 1.7gz p4 zeon are about 50us latency but the determism
> depends on alot of things. If we run the app
> in single user mode the variance (determinism) numbers are almost
> exceptable (but not really).
> They end up around 100us in single user mode. They are 2-45 ms with X
> running which is crazy.
> A simple move of the mouse causes the numbers to go into never never
> land. With no X (run level 3) the numbers are better but still very
> unexceptable.
Of course. Standard Linux is a server OS, not a real time OS!
You have to use Linux/lowlatency, kpreempt or similar patches to achieve
anything like real time performance in user space, and even then, it's
very unlikely that you'll get that kind of figures for worst case. Even
kpreempt has to honor kernel spinlocks, which can be held for a lot
longer than 60 �s.
> Why I am posting is, we want to try rtlinux to see what it gets us. I
> have installed the 3.1
> version for the 2.4.4 kernel and did the suggested method of making
> mk.rtl available to our
> makefiles for the app compile. It didn't change anything. I need to
> figure out if there is an
> easy way to make our app look like real-time to rtlinux. I've looked at
> the rtlinux API and
> many of the stanard linux calls are available and I assume they are
> different but with the
> same names. I'm not a C programmer. I'm an old fortran/assembler guy
> from the days of this
> old proprietary OS. IS there an easy way for me to try rtlinux for this
> app such that it doesn't have to be rewritten.
Provided your application doesn't depend on other services than pthreads
and your own drivers, it should be possible to port it to RTLinux with a
reasonable amount of work. There are also RTLinux drivers for various
hardware, including network devices (with RT protocol stacks), so even
that should be relatively easy to handle.
If you need dynamic memory allocation and other "nasty" stuff (which
seems to be getting more and more popular these days, even in so called
hard real time applications), there might be more work to do. You can use
preallocated pools of fixed size objects - if you aren't already.
For "true" dynamic allocation (ie malloc(<any reasonable block size>)),
you may look at RTAI, which provides such a solution. (Included in the
RTAI distro, I think.)
> What about our drivers that we had to write for linux?
> Is there anything that will have to be done to them?
The ones that *must* run with real time perormance will have to be ported
to RTlinux. (Which in this case, probably would involve replacing some
sync constructs and using the rtl_posixio layer instead of the Linux
kernel register_chrdev() and co.)
Drivers for buffered, soft real time I/O (such as writing stuff to disk
or screen) can be done with the standard drivers. The simplest way is
probably to communicate with user space (using RTL FIFOs and/or shared
memory), and do the I/O from there.
With a user space real time patch in combination with RTL, you can also
move "firm" real time stuff, such as real time graphics rendering, to
user space. (Which in that particular example, would simplify things a
*lot* - software rendering directly to VRAM from within RTL is doable,
but imagine porting a full OpenGL implementation to RTL... *heh*)
> Does one have to be a linux
> kernel hacker to make an app run in real-time under rtlinux?
Well, that depends on what you need to do... *Anything* is possible -
it's just a matter of how deep you're willing to hack.
> Is there an easy way to test this to see if it's what we need?
Hack a very simple test application to do some benchmarking? Apart from
simple hard facts that we can give you on this list, evaluation is a
matter of writing up simple code to stress test the most critical
features that you need.
More specifically, most proper hardware should have no problem whatsoever
with 60 �s deadlines. +/- 1 �s scheduling jitter *will* be a problem,
though - even P-II and P-III cores with full speed cache, such as
Celeron, P-III w/ 256 kB cache, and AFAIK, all Xeons - will have a
scheduling jitter of few �s or more. But of course, that could be dealt
with as well, at least in some cases;
If you get interrupts from a hardware timer, set it up to interrupt a few
�s early, and then busy wait, polling the timer until you're at the
correct time to start your task. (There are solutions for that in RTLinux
as well as RTAI - at least one has a scheduler with that feature
built-in, IIRC.)
For other interrupt sources, it's still possible to do the same thing,
although you'll need a way to tell exactly when the interrupt occured.
Unless the hardware has a timer with an "interrupt timestamp" latch that
you can read, you have to rely on the system interrupt controller (and
the ISA legacy crap won't help you there; APIC might...), or a custom
device. You could probably add some circuitry with a timer and one latch
for each ISA IRQ line, to timestamp any IRQs in the system (although I'm
not sure that would give you the PCI and AGP IRQs on all chipsets), or
perhaps a PCI device that traps the PCI IRQ lines.
//David Olofson --- Programmer, Reologica Instruments AB
- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
`----------------------------> http://www.linuxdj.com/maia -'
- David Olofson -------------------------------------------.
| Audio Hacker - Open Source Advocate - Singer - Songwriter |
`-------------------------------------> http://olofson.net -'
- -- [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/
------------------------------
Date: Tue, 6 Nov 2001 11:03:43 -0800
From: [EMAIL PROTECTED]
Subject: Re: [rtl] Low Cost Term Life Insurance XMUM
>>>>don�t spam me again !!!!, i�am not interessted in your fucking insurance
>>>>[EMAIL PROTECTED] wrote:
>>>>>
>>>>>
>>>>> Term Quotes Life Insurance Companies
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Since 1996, term life insurance rates have been reduced by as much as 70%
>>>>>
>>>>> 40 year old male - $250,000 - 10 year level term
>>>>> As low as $10.44 per month!
>>>>>
>>>>> At TermQuotes Life Insurance Companies of America, we will survey the
>>>>> top life insurance companies for you and provide you with the best rates
>>>>> available. The quote is free. There is no obligation to buy. Compare the
>>>>> rates and see for yourself. Fill out this quick form below for further
>>>>> information.
>>>>>
>>>>> Results of computer survey 07-09-01
>>>>> Sample Annual Premiums
>>>>> * 10 Year Level Premium Term Rates *
>>>>> Age $250,000 $500,000 $1,000,000
>>>>> 35 $115 $175 $305
>>>>> 45 $210 $375 $670
>>>>> 55 $500 $935 $1,370
>>>>> 65 $1,305 $2,550 $4,920
>>>>> 70 $2,265 $4,480 $7,510
>>>>>
>>>>>
>>>>> *Above rates guaranteed to remain level for 10 years
>>>>> Rates based on male preferred class 1 non-smoker
>>>>> Policies are guaranteed renewable to age 95
>>>>> Policies with 15, 20, 25, and 30 year level premiums also available
>>>>>
>>>>> Attention All Smokers,
>>>>> you may qualify for special reduced smoker rates!
>>>>>
>>>>> Universal Life, Second-to-Die and Estate Planning products also provided.
>>>>>
>>>>> Submit This Form for a Free Term Insurance Quote!
>>>>>
>>>>> Name Insured:
>>>>> Amount of Coverage:
>>>>> Date of Birth: Month Day Year
>>>>> Sex: Male Female
>>>>> Height: FT in
>>>>> Weight: lbs.
>>>>> Occupation:
>>>>> xxx
>>>>> Have You Ever Had:
>>>>> High Blood Pressure Yes No
>>>>> Heart Attack or Stroke Yes No
>>>>> Cancer Yes No
>>>>> Diabetes Yes No
>>>>> Mother, Father, Sister, Brother Diagnosed or Died of Cancer or
>>>>> Cardiovascular Disease Before Age 60 Yes No
>>>>> Have You Smoked Within the Last 12 Months Yes No
>>>>> xxx
>>>>> Person Completing Request:
>>>>> Mailing Address:
>>>>> City: State Zip
>>>>> Daytime Phone:
>>>>> Evening Phone:
>>>>> Email Address:
>>>>> Best time to contact:
>>>>>
>>>>> When you click submit it may start your spell check, so please click
>>>>> "Ignore" if it does.
>>>>>
>>>>>
>>>>> YOUR INTERNET ADVERTISING
>>>>> Copyright�FFFFA92000-2001 . All Rights Reserved
>>>>>
>>>>> This could be your ad!
>>>>>
>>>>> Email Us <mailto:[EMAIL PROTECTED]?subject=Direct Marketing
>>>>> Inquiry> with your name and a good phone number to reach you.
>>>>>
>>>>> If you think, that you will not benefit from this correspondence, please
>>>>> click here. <http://www.removeyou.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/
>>>>--
>>>>Thomas Sauter Tel. 06221/75933-15
>>>>20/10 Perfect Vision [EMAIL PROTECTED]
>>>>Waldhofer Str. 100
>>>>D-69123 Heidelberg
>>>>-- [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/
>>>*** Your message did not reach its recipient ***
>>>It was caught by the mailing system as spam.
>>>If this message is not spam and you feel that
>>>this message was caught in error, please email
>>>a note to [EMAIL PROTECTED]
>>>If this message is spam, knock it off!
>>>This server is in California where it is illegal
>>>to spam! We do not accept spam here!
>>>We will go after all spammers to the maximum
>>>extent of the law!
>>>-- [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/
>>*** Your message did not reach its recipient ***
>>It was caught by the mailing system as spam.
>>If this message is not spam and you feel that
>>this message was caught in error, please email
>>a note to [EMAIL PROTECTED]
>>If this message is spam, knock it off!
>>This server is in California where it is illegal
>>to spam! We do not accept spam here!
>>We will go after all spammers to the maximum
>>extent of the law!
>>-- [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/
>*** Your message did not reach its recipient ***
>It was caught by the mailing system as spam.
>If this message is not spam and you feel that
>this message was caught in error, please email
>a note to [EMAIL PROTECTED]
>If this message is spam, knock it off!
>This server is in California where it is illegal
>to spam! We do not accept spam here!
>We will go after all spammers to the maximum
>extent of the law!
>-- [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/
*** Your message did not reach its recipient ***
It was caught by the mailing system as spam.
If this message is not spam and you feel that
this message was caught in error, please email
a note to [EMAIL PROTECTED]
If this message is spam, knock it off!
This server is in California where it is illegal
to spam! We do not accept spam here!
We will go after all spammers to the maximum
extent of the law!
- -- [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/
------------------------------
End of rtl-digest V1 #139
*************************
-- [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/