This is the mail archive of the
ecos-discuss@sourceware.org
mailing list for the eCos project.
Re: Stop application execution from kernel
- From: John Dallaway <john at dallaway dot org dot uk>
- To: Nodir Kodirov <nodir dot qodirov at gmail dot com>
- Cc: eCos Discussion <ecos-discuss at ecos dot sourceware dot org>
- Date: Mon, 15 Mar 2010 08:52:18 +0000
- Subject: [ECOS] Re: Stop application execution from kernel
- References: <186ad4051003130113u4531a54fq2025b47f33e9c0c6@mail.gmail.com>
Hi Nodir
Nodir Kodirov wrote:
> I am trying to make *schedulability analysis* for my application,
> where user will enter *wcet* and *period* of each thread at thread
> creation time and I will check schedulability based on these two
> values. I am doing this in kernel domain and after checking, I am
> *prompting* user about *non-feasible schedule* (if threads' CPU usage
> is greater than 100%). Now, I am fully able to prompt user about
> *non-schedulability* and stop application execution from kernel with
> this code:
>
>> cyg_bool fail = false;
>> CYG_TRACE1(1, "Non-feasible scheduling", true);
>> fail = true;
>> CYG_ASSERT( !fail, "Correct thread's wcet please, it is failed");
>
> But, when I disable *Infrastructure->Asserts & Tracing* in ConfigTool
> it doesn't work (because my code is based on Asserts & Tracing). So,
> my question, is it possible to do this without *Asserts&Tracing*? I
> mean to disable *Asserts&Tracing* and being able to stop application
> execution after prompting user in command line.
The configurable tracing and assertion macros are provided to allow
diagnostics messages to be eliminated for release builds where there is
no accessible diagnostic channel. This is generally a good thing.
You can call diag_printf() directly in order to emit a diagnostic
message unconditionally and you can use "for(;;);" to halt the
application. But would it not be better to educate users of your
scheduler to enable asserts and tracing during development?
John Dallaway
eCos maintainer
--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss