rtl-digest Tuesday, November 13 2001 Volume 01 : Number 152
----------------------------------------------------------------------
Date: Mon, 12 Nov 2001 21:03:57 -0800 (PST)
From: Krupa Sivakumaran <[EMAIL PROTECTED]>
Subject: [rtl] serial port interrupt generation
im using rtlinux-2.2. ive installed IRQ handler for
IRQ4(/dev/ttyS0) using rtl_request_irq(). the handler
is as follows.
{
rtl_printf("<IRQ 4 handler> IIR = %x",
inb(COMM1BASE+2));
return 0;
}
ive also connected the 2 serial ports using a null
modem cable.
when i do "echo hello > /dev/ttyS1" i thought data
will b recved in /dev/ttyS0(due to the null modem
cable) and ill get an interrupt. but it doesnt happen.
but when i do "echo hello > /dev/ttyS0" i get 2
interrupts as follows.
<IRQ 4 handler> IIR = c2
(after some time)
<IRQ 4 handler> IIR = 1
the first i found was tx buffer empty and the 2nd was
no ints pending.
ive checked the null modem cable and its perfect.
wat should i do to get the interrupt on the recving side?
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
- -- [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, 12 Nov 2001 21:03:57 -0800 (PST)
From: Krupa Sivakumaran <[EMAIL PROTECTED]>
Subject: [rtl] serial port interrupt generation
im using rtlinux-2.2. ive installed IRQ handler for
IRQ4(/dev/ttyS0) using rtl_request_irq(). the handler
is as follows.
{
rtl_printf("<IRQ 4 handler> IIR = %x",
inb(COMM1BASE+2));
return 0;
}
ive also connected the 2 serial ports using a null
modem cable.
when i do "echo hello > /dev/ttyS1" i thought data
will b recved in /dev/ttyS0(due to the null modem
cable) and ill get an interrupt. but it doesnt happen.
but when i do "echo hello > /dev/ttyS0" i get 2
interrupts as follows.
<IRQ 4 handler> IIR = c2
(after some time)
<IRQ 4 handler> IIR = 1
the first i found was tx buffer empty and the 2nd was
no ints pending.
ive checked the null modem cable and its perfect.
wat should i do to get the interrupt on the recving side?
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
- -- [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, 12 Nov 2001 21:03:57 -0800 (PST)
From: Krupa Sivakumaran <[EMAIL PROTECTED]>
Subject: [rtl] serial port interrupt generation
im using rtlinux-2.2. ive installed IRQ handler for
IRQ4(/dev/ttyS0) using rtl_request_irq(). the handler
is as follows.
{
rtl_printf("<IRQ 4 handler> IIR = %x",
inb(COMM1BASE+2));
return 0;
}
ive also connected the 2 serial ports using a null
modem cable.
when i do "echo hello > /dev/ttyS1" i thought data
will b recved in /dev/ttyS0(due to the null modem
cable) and ill get an interrupt. but it doesnt happen.
but when i do "echo hello > /dev/ttyS0" i get 2
interrupts as follows.
<IRQ 4 handler> IIR = c2
(after some time)
<IRQ 4 handler> IIR = 1
the first i found was tx buffer empty and the 2nd was
no ints pending.
ive checked the null modem cable and its perfect.
wat should i do to get the interrupt on the recving side?
__________________________________________________
Do You Yahoo!?
Find the one for you at Yahoo! Personals
http://personals.yahoo.com
- -- [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, 13 Nov 2001 12:35:40 +0100
From: Ivan Martinez <[EMAIL PROTECTED]>
Subject: Re: [rtl] unresolved symbol atexit
I think Kdevelop's debugging tool will make it. It uses gdb, doesn't it?. If
you tell me where atexit() is defined, I could place a breakpoint there.
I already have the user-space version of my code for testing.
On Monday 12 November 2001 19:39, Norm Dresner wrote:
> 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 called and then in the main program I would write
> out something that indicated whether my atexit function was
> called or not.
> 3. Use objdump on the .o file created from my .cpp and
> look at the function calls in it. This is no guarantee
> because it ignores the C++ startup routine but it would be
> an indicator.
>
> Norm
>
>
> ----- Original Message -----
> From: Ivan Martinez <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>; Ish Rattan
> <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Cc: Dresner, Norman A. <[EMAIL PROTECTED]>
> Sent: Monday, November 12, 2001 4:55 AM
> Subject: Re: [rtl] unresolved symbol atexit
>
> > Not really. After reducing my includes to <rtl_cpp.h> and
>
> my <testclass.h> I
>
> > still have the same problem.
> > Ivan
> >
> > On Friday 09 November 2001 16:32, Ish Rattan wrote:
> > > On Fri, 9 Nov 2001, Ivan Martinez wrote:
> > > > I don't call atexit() at all. This is my list of
>
> includes:
> > > May be something that you are calling does :-) Some
>
> function declared in
>
> > > math.h or sys/stat.h is doing it chase it down (it is a
>
> little tedious
>
> > > but can be done).
> > >
> > > -ishwar
> > >
> > > -- [rtl] ---
> > > To unsubscribe:
> > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > > echo "unsubscribe rtl <Your_email>" | mail
>
> [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/
- -- [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, 13 Nov 2001 08:36:23 -0500
From: Andrew Fischer <[EMAIL PROTECTED]>
Subject: [rtl] Docs / sample code for PCI-DAS6402/16
Does anyone know where I can find sample code or additional
documentation for the Measurement Computing PCI-DAS6402/16???
MC's tech support is trying, but haven't got anything to me yet...
I'm looking at the comedi driver, so far I'm still clueless.
Andrew Fischer
Emory University
Atlanta, GA
- -- [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, 13 Nov 2001 07:49:52 -0500
From: "Billalabeitia, Jose Carlos (IndSys, GEPM)" <[EMAIL PROTECTED]>
Subject: Re: [rtl] RT-Linux interrupts.
Sorry if this e-mail was previously sent, but we are having
problem with our server.
Hi Wolfgang, you wrote:
>We have implemented a new, flat model of interrupt handling on the
>8xx under RTAI; please let me know if this is an option for you.
First of all, thank you for responding to my question. Let
me explain my arhitecture:
1.- HARDWARE: it is an custom MPC860T board with some
peripherals that use SCCx, SMCx, SPI, I2C, FEC.
2.- SOFTWARE: linux kernel 2.4.4-2001-05-12 from ftp.denx.de
with minor changes to adapt an JFFS2 and some other
hardware issues. Right now I am working with the RT-Linux 3.0
patch that comes with this kernel.
The thing is that I want to manage the above controllers, some
in a RT module, some in Linux and some in both. The problem comes
up when trying to capture CPM interrupts from a RT module. With
RT-Linux I get to catch the CPM interrupt, and then I should
filter the controller interrupt that I wish; but the CPM interrupt
is triggering every 25 microseconds and the IRQ handler is being
called all the time, without leaving time for other tasks. The
good thing would be that the IRQ handler catches only the specific
CPM controller interrupt, in a flat model. I tried adding some
code from "cpm-multi-level.c" in the LinuxPPC list but it doesn�t work.
RT-Linux doesn�t work with this flat model. Is the RTAI 24.1.4,
that comes with this kernel, able to solve this problem? If so, how
can this kernel cope with this two interrupt models? Does each
patch change the kernel to work with its own interrupt model?
Can an specific CPM interrupt (not the CPM interrupt itself) be
captured by the RT module and then leave it for Linux, in other
words, with RTAI is Linux prepared to work with this flat model?
If RTAI 24.1.4 solves this problem, are there many differences
between RT-Linux and RTAI, from a programming point of view?
Right now we are very advanced in our project and this is a
crucial issue, so we are very interested in solving this problem.
Obviously RTAI can be an important option for us, if this problem
is very difficult to solve with RT-Linux.
Thank you in advance
Billa
- -- [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, 13 Nov 2001 09:17:35 -0500
From: "Dresner, Norman A." <[EMAIL PROTECTED]>
Subject: RE: [rtl] unresolved symbol atexit
Ivan.
While I'd have to start searching around for that information, I
think that you should be able to get there in a matter of a few seconds with
gdb. According to my gdb book, you can use the command
break {function_name}
to seta breakpoint. The only possible drawback to this is name-mangling but
since it's a c-function, not a c++ one, I believe that it should be called
_atexit. If this doesn't work, e-mail me off list at both of the addresses
below and I'll do some searching.
Norman Dresner
Fellow Avionics Support Systems Engineer
& (SGI) Advanced Signal Processing Laboratory Administrator
Radar Systems Engineering Department
Electronic Systems and Sensors
Northrop Grumman Corporation
Baltimore-Washington International Airport
7323 Aviation Boulevard
Baltimore Maryland 21240
Voice: (410) 993 - 2096 Mornings; all-day voice-mail
(410) 969 - 8068 Afternoons with answering machine
FAX: (410) 993 - 8084 On-site
(410) 969 - 8068 Afternoons; call first to arrange
E-Mail: Mornings: mailto:[EMAIL PROTECTED]
Afternoons: mailto:[EMAIL PROTECTED]
> -----Original Message-----
> From: Ivan Martinez [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 6:36 AM
> To: Norm Dresner; [EMAIL PROTECTED]
> Subject: Re: [rtl] unresolved symbol atexit
>
> I think Kdevelop's debugging tool will make it. It uses gdb, doesn't it?.
> If
> you tell me where atexit() is defined, I could place a breakpoint there.
> I already have the user-space version of my code for testing.
>
> On Monday 12 November 2001 19:39, Norm Dresner wrote:
> > 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 called and then in the main program I would write
> > out something that indicated whether my atexit function was
> > called or not.
> > 3. Use objdump on the .o file created from my .cpp and
> > look at the function calls in it. This is no guarantee
> > because it ignores the C++ startup routine but it would be
> > an indicator.
> >
> > Norm
> >
> >
> > ----- Original Message -----
> > From: Ivan Martinez <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>; Ish Rattan
> > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > Cc: Dresner, Norman A. <[EMAIL PROTECTED]>
> > Sent: Monday, November 12, 2001 4:55 AM
> > Subject: Re: [rtl] unresolved symbol atexit
> >
> > > Not really. After reducing my includes to <rtl_cpp.h> and
> >
> > my <testclass.h> I
> >
> > > still have the same problem.
> > > Ivan
> > >
> > > On Friday 09 November 2001 16:32, Ish Rattan wrote:
> > > > On Fri, 9 Nov 2001, Ivan Martinez wrote:
> > > > > I don't call atexit() at all. This is my list of
> >
> > includes:
> > > > May be something that you are calling does :-) Some
> >
> > function declared in
> >
> > > > math.h or sys/stat.h is doing it chase it down (it is a
> >
> > little tedious
> >
> > > > but can be done).
> > > >
> > > > -ishwar
> > > >
> > > > -- [rtl] ---
> > > > To unsubscribe:
> > > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > > > echo "unsubscribe rtl <Your_email>" | mail
> >
> > [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/
> -- [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, 13 Nov 2001 15:28:07 +0100
From: Ivan Martinez <[EMAIL PROTECTED]>
Subject: Re: [rtl] Still... how can I include unistd.h in C++ realtime modules?
That doesn't make any difference, I get exactly the same errors :-(
On Monday 12 November 2001 12:59, David Olofson wrote:
> On Monday 12 November 2001 10:45, Ivan Martinez wrote:
> > Including rtl_posixio.h in the very first line causes:
> >
> > In file included from
> > /usr/src/rtlinux-3.1/linux/include/linux/wait.h:14, from
> > /usr/src/rtlinux-3.1/linux/include/linux/fs.h:12, from
> > /usr/src/rtlinux-3.1/include/rtl_posixio.h:13, from rtmodule.cpp:1:
> > /usr/src/rtlinux-3.1/linux/include/linux/list.h:35: parse error before
> > `new' /usr/src/rtlinux-3.1/linux/include/linux/list.h: In function
> > `void __list_add (...)':
> > /usr/src/rtlinux-3.1/linux/include/linux/list.h:39: `next' undeclared
> > (first use this function)
> > /usr/src/rtlinux-3.1/linux/include/linux/list.h:39: (Each undeclared
> > identifier is reported only once
>
> Ok; those headers aren't written for C++, so you have to tell the
> compiler explicitly to treat them like C code;
>
> extern "C" {
> #include <various C headers>
> }
>
> That goes for all kernel headers actually. C++ compilers usually generate
> different symbol names for the same code and various other linkage
> differences, so you'll get either unresolved symbols or nasty bugs if you
> don't tell the compiler what to do.
>
>
> //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]
- -- [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, 13 Nov 2001 07:22:53 -0700
From: Victor Yodaiken <[EMAIL PROTECTED]>
Subject: Re: [rtl] RT-Linux interrupts.
> 1.- HARDWARE: it is an custom MPC860T board with some
> peripherals that use SCCx, SMCx, SPI, I2C, FEC.
>
> 2.- SOFTWARE: linux kernel 2.4.4-2001-05-12 from ftp.denx.de
> with minor changes to adapt an JFFS2 and some other
> hardware issues. Right now I am working with the RT-Linux 3.0
> patch that comes with this kernel.
>
> The thing is that I want to manage the above controllers, some
> in a RT module, some in Linux and some in both. The problem comes
> up when trying to capture CPM interrupts from a RT module. With
> RT-Linux I get to catch the CPM interrupt, and then I should
> filter the controller interrupt that I wish; but the CPM interrupt
> is triggering every 25 microseconds and the IRQ handler is being
> called all the time, without leaving time for other tasks. The
> good thing would be that the IRQ handler catches only the specific
> CPM controller interrupt, in a flat model. I tried adding some
> code from "cpm-multi-level.c" in the LinuxPPC list but it doesn�t work.
Can you explain what you would like to happen?
If the CPM interrupt triggers every 25us, then it triggers every 25us
and there is nothing that any software can do other than disable the
interrupt.
BTW: as I understand it, PPC Linux does have a "flat" model with the
low level code reaching out to determine which device is responsible
by looking at the second level interrupt controller.
- -- [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, 13 Nov 2001 16:00:34 +0100
From: Erwin Rol <[EMAIL PROTECTED]>
Subject: Re: [rtl] Still... how can I include unistd.h in C++ realtime modules?
This is a very well known problem, and seen by quite a few ppl trying to use
C++ in the linux kernel. Not only the linkage is important but also the fact
that the linux kernel uses several names that are keywords in C++, for example
new (like in this case). The only solution is not to inlcude kernel headers in
C++ source files (also not indirectly). To use C functions from the kernel or
RTL you will have to redefine them in a separate header file with only the
prototypes. If the function for example needs a pointer of a certain type ,
like RT_TASK* or so you will have to fake those.
Pierre Cloutier and myself made a start for things like that in RTAI but
almost had to duplicate all RTAI prototypes, we hope that we can make the use
of C++ and LXRT (which had the same problem) easier in the next major version
of RTAI, but that won't solve your problem with RTL.
You might be able to find a C++ module i mail to the RTAI list in the list
archive, maybe that will help you a bit.
- - Erwin
Ivan Martinez wrote:
>
> That doesn't make any difference, I get exactly the same errors :-(
>
> On Monday 12 November 2001 12:59, David Olofson wrote:
> > On Monday 12 November 2001 10:45, Ivan Martinez wrote:
> > > Including rtl_posixio.h in the very first line causes:
> > >
> > > In file included from
> > > /usr/src/rtlinux-3.1/linux/include/linux/wait.h:14, from
> > > /usr/src/rtlinux-3.1/linux/include/linux/fs.h:12, from
> > > /usr/src/rtlinux-3.1/include/rtl_posixio.h:13, from rtmodule.cpp:1:
> > > /usr/src/rtlinux-3.1/linux/include/linux/list.h:35: parse error before
> > > `new' /usr/src/rtlinux-3.1/linux/include/linux/list.h: In function
> > > `void __list_add (...)':
> > > /usr/src/rtlinux-3.1/linux/include/linux/list.h:39: `next' undeclared
> > > (first use this function)
> > > /usr/src/rtlinux-3.1/linux/include/linux/list.h:39: (Each undeclared
> > > identifier is reported only once
> >
> > Ok; those headers aren't written for C++, so you have to tell the
> > compiler explicitly to treat them like C code;
> >
> > extern "C" {
> > #include <various C headers>
> > }
> >
> > That goes for all kernel headers actually. C++ compilers usually generate
> > different symbol names for the same code and various other linkage
> > differences, so you'll get either unresolved symbols or nasty bugs if you
> > don't tell the compiler what to do.
> >
> >
> > //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]
> -- [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, 13 Nov 2001 16:10:32 +0100
From: Ivan Martinez <[EMAIL PROTECTED]>
Subject: Re: [rtl] unresolved symbol atexit
OK, some enlightment. Seems atexit is first called from a line where I make
an *static* declaration of the class inside a function:
void block_L_SysVar2Reference(void)
{
static unsigned long flags;
static TestClass SystemInput; // <-- HERE
static TestClass Reference;
...
YES, after substituting all the "static TestClass" by just "TestClass" I can
install the module with no problem. Maybe realtime C++ can't deal with such
static declarations properly?.
Ivan
On Tuesday 13 November 2001 15:17, Dresner, Norman A. wrote:
> Ivan.
>
> While I'd have to start searching around for that information, I
> think that you should be able to get there in a matter of a few seconds
> with gdb. According to my gdb book, you can use the command
> break {function_name}
> to seta breakpoint. The only possible drawback to this is name-mangling
> but since it's a c-function, not a c++ one, I believe that it should be
> called _atexit. If this doesn't work, e-mail me off list at both of the
> addresses below and I'll do some searching.
>
>
> Norman Dresner
> Fellow Avionics Support Systems Engineer
> & (SGI) Advanced Signal Processing Laboratory Administrator
> Radar Systems Engineering Department
> Electronic Systems and Sensors
> Northrop Grumman Corporation
> Baltimore-Washington International Airport
> 7323 Aviation Boulevard
> Baltimore Maryland 21240
>
> Voice: (410) 993 - 2096 Mornings; all-day voice-mail
> (410) 969 - 8068 Afternoons with answering machine
> FAX: (410) 993 - 8084 On-site
> (410) 969 - 8068 Afternoons; call first to arrange
> E-Mail: Mornings: mailto:[EMAIL PROTECTED]
> Afternoons: mailto:[EMAIL PROTECTED]
>
> > -----Original Message-----
> > From: Ivan Martinez [SMTP:[EMAIL PROTECTED]]
> > Sent: Tuesday, November 13, 2001 6:36 AM
> > To: Norm Dresner; [EMAIL PROTECTED]
> > Subject: Re: [rtl] unresolved symbol atexit
> >
> > I think Kdevelop's debugging tool will make it. It uses gdb, doesn't it?.
> > If
> > you tell me where atexit() is defined, I could place a breakpoint there.
> > I already have the user-space version of my code for testing.
> >
> > On Monday 12 November 2001 19:39, Norm Dresner wrote:
> > > 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 called and then in the main program I would write
> > > out something that indicated whether my atexit function was
> > > called or not.
> > > 3. Use objdump on the .o file created from my .cpp and
> > > look at the function calls in it. This is no guarantee
> > > because it ignores the C++ startup routine but it would be
> > > an indicator.
> > >
> > > Norm
> > >
> > >
> > > ----- Original Message -----
> > > From: Ivan Martinez <[EMAIL PROTECTED]>
> > > To: <[EMAIL PROTECTED]>; Ish Rattan
> > > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > Cc: Dresner, Norman A. <[EMAIL PROTECTED]>
> > > Sent: Monday, November 12, 2001 4:55 AM
> > > Subject: Re: [rtl] unresolved symbol atexit
> > >
> > > > Not really. After reducing my includes to <rtl_cpp.h> and
> > >
> > > my <testclass.h> I
> > >
> > > > still have the same problem.
> > > > Ivan
> > > >
> > > > On Friday 09 November 2001 16:32, Ish Rattan wrote:
> > > > > On Fri, 9 Nov 2001, Ivan Martinez wrote:
> > > > > > I don't call atexit() at all. This is my list of
> > >
> > > includes:
> > > > > May be something that you are calling does :-) Some
> > >
> > > function declared in
> > >
> > > > > math.h or sys/stat.h is doing it chase it down (it is a
> > >
> > > little tedious
> > >
> > > > > but can be done).
> > > > >
> > > > > -ishwar
> > > > >
> > > > > -- [rtl] ---
> > > > > To unsubscribe:
> > > > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > > > > echo "unsubscribe rtl <Your_email>" | mail
> > >
> > > [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/
> >
> > -- [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, 13 Nov 2001 16:55:31 +0100
From: Ivan Martinez <[EMAIL PROTECTED]>
Subject: Re: [rtl] unresolved symbol atexit
.. and I didn't forget the __do_global_XXX calls:
int init_module(void)
{
__do_global_ctors_aux();
pthread_attr_t attr;
struct sched_param sched_param;
rtf_destroy(0);
rtf_create(0, 160);
rtf_destroy(1);
rtf_create(1, 160);
setsharedmem_SystemInput = (TestClass*) __va(262144000);
sharedmemlock_SystemInput = (char*) __va(262144000 + sizeof(TestClass));
pthread_attr_init(&attr);
sched_param.sched_priority = 0;
pthread_attr_setschedparam(&attr, &sched_param);
pthread_create(&L, &attr, loop_L, (void *)NULL);
pthread_setfp_np(L, 1);
pthread_make_periodic_np(L, gethrtime(), 100000000);
start_execution();
return 0;
}
void cleanup_module(void)
{
stop_execution();
__do_global_dtors_aux();
pthread_delete_np(L);
rtf_destroy(0);
rtf_destroy(1);
}
On Tuesday 13 November 2001 16:10, Ivan Martinez wrote:
> OK, some enlightment. Seems atexit is first called from a line where I make
> an *static* declaration of the class inside a function:
>
> void block_L_SysVar2Reference(void)
> {
> static unsigned long flags;
> static TestClass SystemInput; // <-- HERE
> static TestClass Reference;
> ...
>
> YES, after substituting all the "static TestClass" by just "TestClass" I
> can install the module with no problem. Maybe realtime C++ can't deal with
> such static declarations properly?.
> Ivan
>
> On Tuesday 13 November 2001 15:17, Dresner, Norman A. wrote:
> > Ivan.
> >
> > While I'd have to start searching around for that information, I
> > think that you should be able to get there in a matter of a few seconds
> > with gdb. According to my gdb book, you can use the command
> > break {function_name}
> > to seta breakpoint. The only possible drawback to this is name-mangling
> > but since it's a c-function, not a c++ one, I believe that it should be
> > called _atexit. If this doesn't work, e-mail me off list at both of the
> > addresses below and I'll do some searching.
> >
> >
> > Norman Dresner
> > Fellow Avionics Support Systems Engineer
> > & (SGI) Advanced Signal Processing Laboratory Administrator
> > Radar Systems Engineering Department
> > Electronic Systems and Sensors
> > Northrop Grumman Corporation
> > Baltimore-Washington International Airport
> > 7323 Aviation Boulevard
> > Baltimore Maryland 21240
> >
> > Voice: (410) 993 - 2096 Mornings; all-day voice-mail
> > (410) 969 - 8068 Afternoons with answering machine
> > FAX: (410) 993 - 8084 On-site
> > (410) 969 - 8068 Afternoons; call first to arrange
> > E-Mail: Mornings: mailto:[EMAIL PROTECTED]
> > Afternoons: mailto:[EMAIL PROTECTED]
> >
> > > -----Original Message-----
> > > From: Ivan Martinez [SMTP:[EMAIL PROTECTED]]
> > > Sent: Tuesday, November 13, 2001 6:36 AM
> > > To: Norm Dresner; [EMAIL PROTECTED]
> > > Subject: Re: [rtl] unresolved symbol atexit
> > >
> > > I think Kdevelop's debugging tool will make it. It uses gdb, doesn't
> > > it?. If
> > > you tell me where atexit() is defined, I could place a breakpoint
> > > there. I already have the user-space version of my code for testing.
> > >
> > > On Monday 12 November 2001 19:39, Norm Dresner wrote:
> > > > 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 called and then in the main program I would write
> > > > out something that indicated whether my atexit function was
> > > > called or not.
> > > > 3. Use objdump on the .o file created from my .cpp and
> > > > look at the function calls in it. This is no guarantee
> > > > because it ignores the C++ startup routine but it would be
> > > > an indicator.
> > > >
> > > > Norm
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: Ivan Martinez <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>; Ish Rattan
> > > > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > > Cc: Dresner, Norman A. <[EMAIL PROTECTED]>
> > > > Sent: Monday, November 12, 2001 4:55 AM
> > > > Subject: Re: [rtl] unresolved symbol atexit
> > > >
> > > > > Not really. After reducing my includes to <rtl_cpp.h> and
> > > >
> > > > my <testclass.h> I
> > > >
> > > > > still have the same problem.
> > > > > Ivan
> > > > >
> > > > > On Friday 09 November 2001 16:32, Ish Rattan wrote:
> > > > > > On Fri, 9 Nov 2001, Ivan Martinez wrote:
> > > > > > > I don't call atexit() at all. This is my list of
> > > >
> > > > includes:
> > > > > > May be something that you are calling does :-) Some
> > > >
> > > > function declared in
> > > >
> > > > > > math.h or sys/stat.h is doing it chase it down (it is a
> > > >
> > > > little tedious
> > > >
> > > > > > but can be done).
> > > > > >
> > > > > > -ishwar
> > > > > >
> > > > > > -- [rtl] ---
> > > > > > To unsubscribe:
> > > > > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > > > > > echo "unsubscribe rtl <Your_email>" | mail
> > > >
> > > > [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/
> > >
> > > -- [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, 13 Nov 2001 17:01:56 +0100
From: Erwin Rol <[EMAIL PROTECTED]>
Subject: Re: [rtl] unresolved symbol atexit
static classes are comparable with global classes they need their constructor
called before main and their destructor after main. Because in a kernelmodule
you don't have a main, you will have to fake it some how when loading the
module.
You could, like i did, look at the sources of libgcc and see how it odes its
global constructors, and copy the idea and addapt it to the kernel module
loading.
- - Erwin
Ivan Martinez wrote:
>
> OK, some enlightment. Seems atexit is first called from a line where I make
> an *static* declaration of the class inside a function:
>
> void block_L_SysVar2Reference(void)
> {
> static unsigned long flags;
> static TestClass SystemInput; // <-- HERE
> static TestClass Reference;
> ...
>
> YES, after substituting all the "static TestClass" by just "TestClass" I can
> install the module with no problem. Maybe realtime C++ can't deal with such
> static declarations properly?.
> Ivan
>
> On Tuesday 13 November 2001 15:17, Dresner, Norman A. wrote:
> > Ivan.
> >
> > While I'd have to start searching around for that information, I
> > think that you should be able to get there in a matter of a few seconds
> > with gdb. According to my gdb book, you can use the command
> > break {function_name}
> > to seta breakpoint. The only possible drawback to this is name-mangling
> > but since it's a c-function, not a c++ one, I believe that it should be
> > called _atexit. If this doesn't work, e-mail me off list at both of the
> > addresses below and I'll do some searching.
> >
> >
> > Norman Dresner
> > Fellow Avionics Support Systems Engineer
> > & (SGI) Advanced Signal Processing Laboratory Administrator
> > Radar Systems Engineering Department
> > Electronic Systems and Sensors
> > Northrop Grumman Corporation
> > Baltimore-Washington International Airport
> > 7323 Aviation Boulevard
> > Baltimore Maryland 21240
> >
> > Voice: (410) 993 - 2096 Mornings; all-day voice-mail
> > (410) 969 - 8068 Afternoons with answering machine
> > FAX: (410) 993 - 8084 On-site
> > (410) 969 - 8068 Afternoons; call first to arrange
> > E-Mail: Mornings: mailto:[EMAIL PROTECTED]
> > Afternoons: mailto:[EMAIL PROTECTED]
> >
> > > -----Original Message-----
> > > From: Ivan Martinez [SMTP:[EMAIL PROTECTED]]
> > > Sent: Tuesday, November 13, 2001 6:36 AM
> > > To: Norm Dresner; [EMAIL PROTECTED]
> > > Subject: Re: [rtl] unresolved symbol atexit
> > >
> > > I think Kdevelop's debugging tool will make it. It uses gdb, doesn't it?.
> > > If
> > > you tell me where atexit() is defined, I could place a breakpoint there.
> > > I already have the user-space version of my code for testing.
> > >
> > > On Monday 12 November 2001 19:39, Norm Dresner wrote:
> > > > 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 called and then in the main program I would write
> > > > out something that indicated whether my atexit function was
> > > > called or not.
> > > > 3. Use objdump on the .o file created from my .cpp and
> > > > look at the function calls in it. This is no guarantee
> > > > because it ignores the C++ startup routine but it would be
> > > > an indicator.
> > > >
> > > > Norm
> > > >
> > > >
> > > > ----- Original Message -----
> > > > From: Ivan Martinez <[EMAIL PROTECTED]>
> > > > To: <[EMAIL PROTECTED]>; Ish Rattan
> > > > <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> > > > Cc: Dresner, Norman A. <[EMAIL PROTECTED]>
> > > > Sent: Monday, November 12, 2001 4:55 AM
> > > > Subject: Re: [rtl] unresolved symbol atexit
> > > >
> > > > > Not really. After reducing my includes to <rtl_cpp.h> and
> > > >
> > > > my <testclass.h> I
> > > >
> > > > > still have the same problem.
> > > > > Ivan
> > > > >
> > > > > On Friday 09 November 2001 16:32, Ish Rattan wrote:
> > > > > > On Fri, 9 Nov 2001, Ivan Martinez wrote:
> > > > > > > I don't call atexit() at all. This is my list of
> > > >
> > > > includes:
> > > > > > May be something that you are calling does :-) Some
> > > >
> > > > function declared in
> > > >
> > > > > > math.h or sys/stat.h is doing it chase it down (it is a
> > > >
> > > > little tedious
> > > >
> > > > > > but can be done).
> > > > > >
> > > > > > -ishwar
> > > > > >
> > > > > > -- [rtl] ---
> > > > > > To unsubscribe:
> > > > > > echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> > > > > > echo "unsubscribe rtl <Your_email>" | mail
> > > >
> > > > [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/
> > >
> > > -- [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, 13 Nov 2001 11:51:18 -0500
From: "Dresner, Norman A." <[EMAIL PROTECTED]>
Subject: RE: [rtl] Still... how can I include unistd.h in C++ realtime mod ules?
While it isn't a good solution, it is a technique for getting going, you
could hack up the header file by hand to include just the statements you
think you want and see if that would allow you to do what you want to do.
If that fails, you have a lot more to worry about than a few compiler
warnings. If it does work, you can then do two things:
1. Continue developing the application you're working on
2. Fight the full-header-file battle
Norm
> -----Original Message-----
> From: Ivan Martinez [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, November 13, 2001 9:28 AM
> To: [EMAIL PROTECTED]; David Olofson
> Subject: Re: [rtl] Still... how can I include unistd.h in C++
> realtime modules?
>
> That doesn't make any difference, I get exactly the same errors :-(
>
> On Monday 12 November 2001 12:59, David Olofson wrote:
> > On Monday 12 November 2001 10:45, Ivan Martinez wrote:
> > > Including rtl_posixio.h in the very first line causes:
> > >
> > > In file included from
> > > /usr/src/rtlinux-3.1/linux/include/linux/wait.h:14, from
> > > /usr/src/rtlinux-3.1/linux/include/linux/fs.h:12, from
> > > /usr/src/rtlinux-3.1/include/rtl_posixio.h:13, from rtmodule.cpp:1:
> > > /usr/src/rtlinux-3.1/linux/include/linux/list.h:35: parse error before
> > > `new' /usr/src/rtlinux-3.1/linux/include/linux/list.h: In function
> > > `void __list_add (...)':
> > > /usr/src/rtlinux-3.1/linux/include/linux/list.h:39: `next' undeclared
> > > (first use this function)
> > > /usr/src/rtlinux-3.1/linux/include/linux/list.h:39: (Each undeclared
> > > identifier is reported only once
> >
> > Ok; those headers aren't written for C++, so you have to tell the
> > compiler explicitly to treat them like C code;
> >
> > extern "C" {
> > #include <various C headers>
> > }
> >
> > That goes for all kernel headers actually. C++ compilers usually
> generate
> > different symbol names for the same code and various other linkage
> > differences, so you'll get either unresolved symbols or nasty bugs if
> you
> > don't tell the compiler what to do.
> >
> >
> > //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]
> -- [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/
------------------------------
End of rtl-digest V1 #152
*************************
-- [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/