public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] cyg_create_thread
@ 2001-09-04  7:46 Christoph Csebits
  2001-09-04  7:55 ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Csebits @ 2001-09-04  7:46 UTC (permalink / raw)
  To: eCos mailing list

hi

I have a MPC860T board with a MBX based
eCos/RedBoot self made port.

With the snapshot of today (04-Sep-2001)
my twothreads example does not work any longer.

it hangs somewhere in the second call of cyg_thread_create:
(sorry for the long list)

TRACE: <FFFF>[94]Cyg_Scheduler_Implementation::Cyg_Scheduler_Implementation() enter
TRACE: <FFFF>[113]Cyg_Scheduler_Implementation::Cyg_Scheduler_Implementation() return void
TRACE: <FFFF>[86]Cyg_Exception_Control::Cyg_Exception_Control() enter
TRACE: <FFFF>[98]Cyg_Exception_Control::Cyg_Exception_Control() return void
TRACE: <FFFF>[77]Cyg_Counter::Cyg_Counter() enter
TRACE: <FFFF>[77]Cyg_Counter::Cyg_Counter() RETURNING UNSET!
TRACE: <FFFF>[422]Cyg_Clock::Cyg_Clock() enter
TRACE: <FFFF>[422]Cyg_Clock::Cyg_Clock() RETURNING UNSET!
TRACE: <FFFF>[77]Cyg_Interrupt::Cyg_Interrupt() enter
TRACE: <FFFF>[77]Cyg_Interrupt::Cyg_Interrupt() vector=0, priority=1, data=000459E8, isr=0002EE04, dsr=0002EE44
TRACE: <FFFF>[100]Cyg_Interrupt::Cyg_Interrupt() return void
TRACE: <FFFF>[806]Cyg_RealTimeClock::Cyg_RealTimeClock() enter
TRACE: <FFFF>[383]void Cyg_Interrupt::attach() enter
TRACE: <FFFF>[444]void Cyg_Interrupt::attach() return void
TRACE: <FFFF>[623]static void Cyg_Interrupt::unmask_interrupt() enter
TRACE: <FFFF>[632]static void Cyg_Interrupt::unmask_interrupt() return void
TRACE: <FFFF>[806]Cyg_RealTimeClock::Cyg_RealTimeClock() RETURNING UNSET!
TRACE: <FFFF>[590]Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() enter
TRACE: <FFFF>[590]Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() sched_info=0000001F
TRACE: <FFFF>[604]Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() return void
TRACE: <FFFF>[467]Cyg_SchedThread::Cyg_SchedThread() enter
TRACE: <FFFF>[467]Cyg_SchedThread::Cyg_SchedThread() RETURNING UNSET!
TRACE: <FFFF>[637]Cyg_Alarm::Cyg_Alarm() enter
TRACE: <FFFF>[637]Cyg_Alarm::Cyg_Alarm() RETURNING UNSET!
TRACE: <FFFF>[191]Cyg_Thread::Cyg_Thread() enter
TRACE: <FFFF>[432]void Cyg_Scheduler_Implementation::register_thread() enter
TRACE: <FFFF>[432]void Cyg_Scheduler_Implementation::register_thread() thread=00042FC0
TRACE: <FFFF>[435]void Cyg_Scheduler_Implementation::register_thread() return void
TRACE: <FFFF>[224]Cyg_Thread::Cyg_Thread() return void
TRACE: <FFFF>[1251]Cyg_IdleThread::Cyg_IdleThread() enter
TRACE: <1>[594]void Cyg_Thread::resume() enter
TRACE: <1>[205]void Cyg_Scheduler_Implementation::add_thread() enter
TRACE: <1>[205]void Cyg_Scheduler_Implementation::add_thread() thread=00042FC0
TRACE: <1>[266]void Cyg_Scheduler_Implementation::add_thread() return void
TRACE: <1>[625]void Cyg_Thread::resume() return void
TRACE: <1>[1258]Cyg_IdleThread::Cyg_IdleThread() return void
TRACE: <1>[81]Cyg_Mutex::Cyg_Mutex() enter
TRACE: <1>[102]Cyg_Mutex::Cyg_Mutex() return void
TRACE: <1>[590]Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() enter
TRACE: <1>[590]Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() sched_info=0000000A
TRACE: <1>[604]Cyg_SchedThread_Implementation::Cyg_SchedThread_Implementation() return void
TRACE: <1>[467]Cyg_SchedThread::Cyg_SchedThread() enter
TRACE: <1>[467]Cyg_SchedThread::Cyg_SchedThread() RETURNING UNSET!
TRACE: <1>[637]Cyg_Alarm::Cyg_Alarm() enter
TRACE: <1>[637]Cyg_Alarm::Cyg_Alarm() RETURNING UNSET!
TRACE: <1>[191]Cyg_Thread::Cyg_Thread() enter
TRACE: <1>[432]void Cyg_Scheduler_Implementation::register_thread() enter
TRACE: <1>[432]void Cyg_Scheduler_Implementation::register_thread() thread=00043938
TRACE: <1>[435]void Cyg_Scheduler_Implementation::register_thread() return void
TRACE: <1>[224]Cyg_Thread::Cyg_Thread() return void
TRACE: <1>[79]cyg_iso_c_start() enter
TRACE: <1>[79]cyg_iso_c_start() (void)
TRACE: <1>[83]void cyg_iso_c_start() Resuming cyg_libc_main_thread
TRACE: <1>[594]void Cyg_Thread::resume() enter
TRACE: <1>[205]void Cyg_Scheduler_Implementation::add_thread() enter
TRACE: <1>[205]void Cyg_Scheduler_Implementation::add_thread() thread=00043938
TRACE: <1>[266]void Cyg_Scheduler_Implementation::add_thread() return void
TRACE: <1>[625]void Cyg_Thread::resume() return void
TRACE: <1>[86]cyg_iso_c_start() return void
TRACE: <1>[1068]Cyg_Check_Structure_Sizes::Cyg_Check_Structure_Sizes() Size of C struct cyg_thread != size of C++ struct Cyg_Thread
ASSERT FAIL: <1>[1080]Cyg_Check_Structure_Sizes::Cyg_Check_Structure_Sizes() Size checks failed

Any hints?
regards, christoph
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] cyg_create_thread
  2001-09-04  7:46 [ECOS] cyg_create_thread Christoph Csebits
@ 2001-09-04  7:55 ` Andrew Lunn
  2001-09-04  9:07   ` Christoph Csebits
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2001-09-04  7:55 UTC (permalink / raw)
  To: Christoph Csebits; +Cc: eCos mailing list

> With the snapshot of today (04-Sep-2001)


> my twothreads example does not work any longer.
> TRACE: <1>[1068]Cyg_Check_Structure_Sizes::Cyg_Check_Structure_Sizes() Size of C struct cyg_thread != size of C++ struct Cyg_Thread
> ASSERT FAIL: <1>[1080]Cyg_Check_Structure_Sizes::Cyg_Check_Structure_Sizes() Size checks failed

After you did a cvs up did you go all the way through the ecosconfig
new, import , check, tree etc. My guess is you have an mix of old and
new header files which is causing a problem. Try building eCos from
clean in an empty directory.

        Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] cyg_create_thread
  2001-09-04  7:55 ` Andrew Lunn
@ 2001-09-04  9:07   ` Christoph Csebits
  2001-09-04  9:49     ` Andrew Lunn
  0 siblings, 1 reply; 5+ messages in thread
From: Christoph Csebits @ 2001-09-04  9:07 UTC (permalink / raw)
  To: eCos mailing list

On Tue, Sep 04, 2001 at 04:55:29PM +0200, Andrew Lunn wrote:
> > my twothreads example does not work any longer.
> > TRACE: <1>[1068]Cyg_Check_Structure_Sizes::Cyg_Check_Structure_Sizes() Size of C struct cyg_thread != size of C++ struct Cyg_Thread
> > ASSERT FAIL: <1>[1080]Cyg_Check_Structure_Sizes::Cyg_Check_Structure_Sizes() Size checks failed
> 
> After you did a cvs up did you go all the way through the ecosconfig
> new, import , check, tree etc. My guess is you have an mix of old and
> new header files which is causing a problem. Try building eCos from
> clean in an empty directory.

I start with a clean build dir. But i am making some changes after
getting the new eCos version (adding my HAL, diagnostic serial driver 
and flash support).

But i dont change something in the kernel/ tree.

still searching for a solution
thanks, christoph

-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ECOS] cyg_create_thread
  2001-09-04  9:07   ` Christoph Csebits
@ 2001-09-04  9:49     ` Andrew Lunn
  2001-09-04 23:35       ` [ECOS] cyg_thread vs. Cyg_Thread Christoph Csebits
  0 siblings, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2001-09-04  9:49 UTC (permalink / raw)
  To: Christoph Csebits; +Cc: eCos mailing list

On Tue, Sep 04, 2001 at 06:07:27PM +0200, Christoph Csebits wrote:
> On Tue, Sep 04, 2001 at 04:55:29PM +0200, Andrew Lunn wrote:
> > > my twothreads example does not work any longer.
> > > TRACE: <1>[1068]Cyg_Check_Structure_Sizes::Cyg_Check_Structure_Sizes() Size of C struct cyg_thread != size of C++ struct Cyg_Thread
> > > ASSERT FAIL: <1>[1080]Cyg_Check_Structure_Sizes::Cyg_Check_Structure_Sizes() Size checks failed
> > 
> I start with a clean build dir. But i am making some changes after
> getting the new eCos version (adding my HAL, diagnostic serial driver 
> and flash support).

Well, the synthetic version compiles and runs OK.

The assertion is saying that the C struct cyg_thread, as defined in
kapidata.h is a different size to the C++ clase Cyg_Thread as defined
in thread.hxx. These two should be identical, member for member. 

Maybe something is happening with the HAL specific entries in these
structures. Things like the register set? You will have to compare
then and see whats different. That should give a clue as to whats
causing the problem.

        Andrew

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [ECOS] cyg_thread vs. Cyg_Thread
  2001-09-04  9:49     ` Andrew Lunn
@ 2001-09-04 23:35       ` Christoph Csebits
  0 siblings, 0 replies; 5+ messages in thread
From: Christoph Csebits @ 2001-09-04 23:35 UTC (permalink / raw)
  To: eCos mailing list

On Tue, Sep 04, 2001 at 06:49:05PM +0200, Andrew Lunn wrote:
> The assertion is saying that the C struct cyg_thread, as defined in
> kapidata.h is a different size to the C++ clase Cyg_Thread as defined
> in thread.hxx. These two should be identical, member for member. 

I have a snapshot from 30-Jul-2001(it works)
and from 04-Sep-2001 (doesn't work).
(MPC860T based platform, MBX based port, gcc 2.95.2)

Fact is that both versions of thread.hxx
(where Cyg_Thread is defined) files are identical.

In the working twothreads application (i get no asserts)
sizeof( cyg_thread ) is 176 and sizeof( Cyg_Thread ) must
be the same.

In the not-working application (version 04-Sep)
sizeof( cyg_thread ) is 186.

Since thread.hxx didn't change beetween the two versions its
clear that i get the an assert on
CYG_ASSERT_SIZES( cyg_thread, Cyg_Thread ); (186 != 176).

maybe there is problem in how the compiler packs the struct
cyg_thread.

30-Jul: install/include/cyg/kernel/kapidata.h

struct cyg_thread
{
    cyg_hardwarethread  hwthread;
    :
    .
}
here we have the struct cyg_hardwarethread as first member
of cyg_thread.


vs. 04-Sep: install/include/cyg/kernel/kapidata.h

struct cyg_thread
{
    CYG_ADDRESS         stack_base;   /* pointer to base of stack area */    \
    cyg_uint32          stack_size;   /* size of stack area in bytes */      \
    CYG_HARDWARETHREAD_STACK_LIMIT_MEMBER                                    \
    CYG_ADDRESS         stack_ptr;    /* pointer to saved state on stack */  \
    CYG_ADDRWORD        entry_point;  /* main entry point (code pointer!) */ \
    CYG_ADDRWORD        entry_data;   /* entry point argument */             \
    CYG_HARDWARETHREAD_SAVED_CONTEXT_MEMBER
    :
    .
}

Am i the only one experiencing such problems?
Thanks for any suggestions.

regards, christoph
-- 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-09-04 23:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-04  7:46 [ECOS] cyg_create_thread Christoph Csebits
2001-09-04  7:55 ` Andrew Lunn
2001-09-04  9:07   ` Christoph Csebits
2001-09-04  9:49     ` Andrew Lunn
2001-09-04 23:35       ` [ECOS] cyg_thread vs. Cyg_Thread Christoph Csebits

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).