[ECOS] RedBoot go command enhancement
Thu Jan 30 21:39:00 GMT 2003
Gary D. Thomas wrote:
> On Thu, 2003-01-30 at 09:38, Mark Salter wrote:
>>>>>>>Gary D Thomas writes:
>>>On Thu, 2003-01-30 at 09:12, Mark Salter wrote:
>>>>Here's a patch I've been playing around with. It provides a
>>>>mechanism for programs started by the RedBoot go command to
>>>>return to the RedBoot prompt and have its exit status displayed.
>>>>It also adds a -c flag to the go command which prevents the
>>>>caches from being disabled before jumping to the program. I've
>>>>only tried it with standalone newlib/libgloss based apps, but
>>>>eCos apps should also be able to use the VV mechanism as well.
>>>>I thought I'd throw this out and solicit any comments.
Just doing it from _exit() would have to be optional and default off. In
the default config programs that don't use main but include the libc
startup package use the dummy one and so exit() is called.
And indeed this type of behaviour may be relied on in user apps now in the
sense that although we guarantee that exit() is called when the last
_POSIX_ thread is stopped, the same is not true of eCos native threads
which exist outside POSIX's control, about which we can't assume anything.
> Maybe we should have a HAL_THREAD_CONTEXT_SIZE macro defined
> by the architecture? It just seems unsafe that one can't know
> how how much of the "stack" is used up for a saved context.
Uh, but we do :-). The under-utilised and unfortunately over-estimated
CYGNUM_HAL_STACK_CONTEXT_SIZE from hal_arch.h. But no matter... as you say
eCosCentric http://www.eCosCentric.com/ <info@eCosCentric.com>
--[ "You can complain because roses have thorns, or you ]--
--[ can rejoice because thorns have roses." -Lincoln ]-- Opinions==mine
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