This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Cyg_Thread::add_to_list()


Chris Morrow <cmorrow@YottaYotta.com> writes:

> I'm sure you have considered this, but why not just remove the thread
> from the thread list in Cyg_Thread:exit()? You loose the ability
> to debug threads in the exit state, but is that of any real concern?

Exited threads are still real threads in some sense. So they should
stay visible to GDB and other thread related interfaces. There's a
difference between an exited thread and a deleted thread. Its presence
in the thread list is one of these. Being able to pick over the corpse
of an exited thread in GDB is also a useful thing to be able to do.

> 
> Something else that I've been puzzled by is that the schedulers have
> access to all threads, so couldn't there be a mechanism where by
> the the gdb stubs query the scheduler for the list of threads?
>

Well, the scheduler would just have to keep a list of threads, just
like we do now. This is just moving the problem to a different place.


-- 
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]