This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Linux Synthetic Target -- How to exit eCos back to linux-shell
- From: Bart Veer <bartv at ecoscentric dot com>
- To: DAM at tt dot dk
- Cc: ecos-discuss at sources dot redhat dot com, MJC at tt dot dk
- Date: Sat, 17 Aug 2002 11:48:06 +0100 (BST)
- Subject: Re: [ECOS] Linux Synthetic Target -- How to exit eCos back to linux-shell
- References: <E8F83D6D2A6AD3118E0300902786A205023714F2@NTEX>
>>>>> "David" == David Marqvar (DAM) <DAM@tt.dk> writes:
David> We are using eCos under Linux to simulate and test our
David> software. We would like to do some automated tests, and
David> therefore need to be able to exit (shutdown) ecos and
David> return to the linux-shell.
David> Does anyone know how to do this?
David> We have tried variations of exit() etc., but it seems that
David> eCos just keeps running the idle-thread (as it should from
David> another point of view). We are using the Kernel and
David> scheduler.
The official way to do this is to call cyg_test_exit(), defined in
<cyg/infra/testcase.h>, either directly or via one of the macros such
as CYG_TEST_EXIT().
On most platforms cyg_test_exit() will do nothing because it does not
make sense for a deeply embedded application to exit (although
perhaps, in a typical development environment it should return control
to RedBoot). On the synthetic target cyg_test_exit() ends up making a
system call cyg_hal_sys_exit() which will terminate the current
process, i.e. the eCos application.
Bart
--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss