... 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/