[ECOS] httpd/monitor problem
Thu May 15 10:55:00 GMT 2003
Maybe i have misunderstod but the below function expects a thread as
input since its parameter is a pointer. I assume that the function
returns the next thread AFTER the one that was sent into the function?
cyg_bool_t cyg_thread_get_next( cyg_handle_t *current, cyg_uint16 *id )
However, in the monitor.c, the following code is present (see below). It
calls the cyg_thread_get_next function with both thread and id set to
zero. Probably the usage of the above function is wrong...?
cyg_handle_t thread = 0;
cyg_uint16 id = 0;
while( cyg_thread_get_next( &thread, &id ) )
> -----Original Message-----
> From: Andrew Lunn [mailto:firstname.lastname@example.org]
> Sent: den 15 maj 2003 12:46
> To: Daniel Lidsten
> Cc: email@example.com
> Subject: Re: [ECOS] httpd/monitor problem
> On Thu, May 15, 2003 at 12:19:35PM +0200, Daniel Lidsten wrote:
> > Hi,
> > I have included the httpd/monitor in my build and i get a strange
> > assert when i hit the "thread" option in the "monitor/index.html".
> > Here is my printout:
> > ASSERT FAIL: <2>kapi.cxx [ 334] cyg_bool_t
> > class pointer (thread) is valid
> > The printout comes from the following row in cyg_thread_get_next:
> > CYG_ASSERT_CLASSC( thread );
> > What does this mean?
> I suspect the "is valid" should be "is invalid". The macro causes the
> check_this() method to be called on the thread class. You can
> find that function in packages/kernel/current/src/common/thread.cxx.
> Probably the thread is a null pointer, although it could be
> the stack pointer is out of range. If it is a null pointer,
> that means *current passed into the function is a null
> pointer. That should be easy to check with gdb. I would
> checked what is going on in the monitor.c code when it
> enumerates the threads. I've had this working with synth, but
> never tried it on real hardware.
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss
More information about the Ecos-discuss